[CRYPTO] api: Remove deprecated interface
[pv_ops_mirror.git] / arch / i386 / mach-voyager / setup.c
blobcfa16c151c8f96a298f318106424b84a0194c678
1 /*
2 * Machine specific setup for generic
3 */
5 #include <linux/init.h>
6 #include <linux/interrupt.h>
7 #include <asm/arch_hooks.h>
8 #include <asm/voyager.h>
9 #include <asm/e820.h>
10 #include <asm/io.h>
11 #include <asm/setup.h>
13 void __init pre_intr_init_hook(void)
15 init_ISA_irqs();
19 * IRQ2 is cascade interrupt to second interrupt controller
21 static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
23 void __init intr_init_hook(void)
25 #ifdef CONFIG_SMP
26 smp_intr_init();
27 #endif
29 setup_irq(2, &irq2);
32 void __init pre_setup_arch_hook(void)
34 /* Voyagers run their CPUs from independent clocks, so disable
35 * the TSC code because we can't sync them */
36 tsc_disable = 1;
39 void __init trap_init_hook(void)
43 static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL};
45 void __init time_init_hook(void)
47 setup_irq(0, &irq0);
50 /* Hook for machine specific memory setup. */
52 char * __init machine_specific_memory_setup(void)
54 char *who;
56 who = "NOT VOYAGER";
58 if(voyager_level == 5) {
59 __u32 addr, length;
60 int i;
62 who = "Voyager-SUS";
64 e820.nr_map = 0;
65 for(i=0; voyager_memory_detect(i, &addr, &length); i++) {
66 add_memory_region(addr, length, E820_RAM);
68 return who;
69 } else if(voyager_level == 4) {
70 __u32 tom;
71 __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT)<<8;
72 /* select the DINO config space */
73 outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT);
74 /* Read DINO top of memory register */
75 tom = ((inb(catbase + 0x4) & 0xf0) << 16)
76 + ((inb(catbase + 0x5) & 0x7f) << 24);
78 if(inb(catbase) != VOYAGER_DINO) {
79 printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
80 tom = (EXT_MEM_K)<<10;
82 who = "Voyager-TOM";
83 add_memory_region(0, 0x9f000, E820_RAM);
84 /* map from 1M to top of memory */
85 add_memory_region(1*1024*1024, tom - 1*1024*1024, E820_RAM);
86 /* FIXME: Should check the ASICs to see if I need to
87 * take out the 8M window. Just do it at the moment
88 * */
89 add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED);
90 return who;
93 who = "BIOS-e820";
96 * Try to copy the BIOS-supplied E820-map.
98 * Otherwise fake a memory map; one section from 0k->640k,
99 * the next section from 1mb->appropriate_mem_k
101 sanitize_e820_map(E820_MAP, &E820_MAP_NR);
102 if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) {
103 unsigned long mem_size;
105 /* compare results from other methods and take the greater */
106 if (ALT_MEM_K < EXT_MEM_K) {
107 mem_size = EXT_MEM_K;
108 who = "BIOS-88";
109 } else {
110 mem_size = ALT_MEM_K;
111 who = "BIOS-e801";
114 e820.nr_map = 0;
115 add_memory_region(0, LOWMEMSIZE(), E820_RAM);
116 add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
118 return who;