2 * Machine specific setup for generic
5 #include <linux/config.h>
6 #include <linux/init.h>
7 #include <linux/interrupt.h>
9 #include <asm/arch_hooks.h>
10 #include <asm/voyager.h>
12 #include <asm/setup.h>
14 void __init pre_intr_init_hook(void)
20 * IRQ2 is cascade interrupt to second interrupt controller
22 static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
24 void __init intr_init_hook(void)
34 void __init pre_setup_arch_hook(void)
36 /* Voyagers run their CPUs from independent clocks, so disable
37 * the TSC code because we can't sync them */
41 void __init trap_init_hook(void)
45 static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
47 void __init time_init_hook(void)
52 /* Hook for machine specific memory setup. */
54 char * __init machine_specific_memory_setup(void)
60 if(voyager_level == 5) {
67 for(i=0; voyager_memory_detect(i, &addr, &length); i++) {
68 add_memory_region(addr, length, E820_RAM);
71 } else if(voyager_level == 4) {
73 __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8;
74 /* select the DINO config space */
75 outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT);
76 /* Read DINO top of memory register */
77 tom = ((inb(catbase + 0x4) & 0xf0) << 16)
78 + ((inb(catbase + 0x5) & 0x7f) << 24);
80 if(inb(catbase) != VOYAGER_DINO) {
81 printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
82 tom = (EXT_MEM_K)<<10;
85 add_memory_region(0, 0x9f000, E820_RAM);
86 /* map from 1M to top of memory */
87 add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM);
88 /* FIXME: Should check the ASICs to see if I need to
89 * take out the 8M window. Just do it at the moment
91 add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED);
98 * Try to copy the BIOS-supplied E820-map.
100 * Otherwise fake a memory map; one section from 0k->640k,
101 * the next section from 1mb->appropriate_mem_k
103 sanitize_e820_map(E820_MAP, &E820_MAP_NR);
104 if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
105 unsigned long mem_size;
107 /* compare results from other methods and take the greater */
108 if (ALT_MEM_K < EXT_MEM_K) {
109 mem_size = EXT_MEM_K;
112 mem_size = ALT_MEM_K;
117 add_memory_region(0, LOWMEMSIZE(), E820_RAM);
118 add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);