# BRCM_VERSION=3
[bcm963xx.git] / kernel / linux / arch / arm / mach-footbridge / arch.c
1 /*
2  * linux/arch/arm/mach-footbridge/arch.c
3  *
4  * Architecture specific fixups.  This is where any
5  * parameters in the params struct are fixed up, or
6  * any additional architecture specific information
7  * is pulled from the params struct.
8  */
9 #include <linux/config.h>
10 #include <linux/module.h>
11 #include <linux/tty.h>
12 #include <linux/delay.h>
13 #include <linux/pm.h>
14 #include <linux/init.h>
15
16 #include <asm/hardware/dec21285.h>
17 #include <asm/elf.h>
18 #include <asm/setup.h>
19 #include <asm/mach-types.h>
20
21 #include <asm/mach/arch.h>
22
23 extern void footbridge_map_io(void);
24 extern void footbridge_init_irq(void);
25 extern void footbridge_init_time(void);
26
27 unsigned int mem_fclk_21285 = 50000000;
28
29 EXPORT_SYMBOL(mem_fclk_21285);
30
31 static int __init parse_tag_memclk(const struct tag *tag)
32 {
33         mem_fclk_21285 = tag->u.memclk.fmemclk;
34         return 0;
35 }
36
37 __tagtable(ATAG_MEMCLK, parse_tag_memclk);
38
39 #ifdef CONFIG_ARCH_EBSA285
40 MACHINE_START(EBSA285, "EBSA285")
41         MAINTAINER("Russell King")
42         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
43         BOOT_PARAMS(0x00000100)
44         VIDEO(0x000a0000, 0x000bffff)
45         MAPIO(footbridge_map_io)
46         INITIRQ(footbridge_init_irq)
47         INITTIME(footbridge_init_time)
48 MACHINE_END
49 #endif
50
51 #ifdef CONFIG_ARCH_NETWINDER
52 /*
53  * Older NeTTroms either do not provide a parameters
54  * page, or they don't supply correct information in
55  * the parameter page.
56  */
57 static void __init
58 fixup_netwinder(struct machine_desc *desc, struct tag *tags,
59                 char **cmdline, struct meminfo *mi)
60 {
61 #ifdef CONFIG_ISAPNP
62         extern int isapnp_disable;
63
64         /*
65          * We must not use the kernels ISAPnP code
66          * on the NetWinder - it will reset the settings
67          * for the WaveArtist chip and render it inoperable.
68          */
69         isapnp_disable = 1;
70 #endif
71 }
72
73 MACHINE_START(NETWINDER, "Rebel-NetWinder")
74         MAINTAINER("Russell King/Rebel.com")
75         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
76         BOOT_PARAMS(0x00000100)
77         VIDEO(0x000a0000, 0x000bffff)
78         DISABLE_PARPORT(0)
79         DISABLE_PARPORT(2)
80         FIXUP(fixup_netwinder)
81         MAPIO(footbridge_map_io)
82         INITIRQ(footbridge_init_irq)
83         INITTIME(footbridge_init_time)
84 MACHINE_END
85 #endif
86
87 #ifdef CONFIG_ARCH_CATS
88 /*
89  * CATS uses soft-reboot by default, since
90  * hard reboots fail on early boards.
91  */
92 static void __init
93 fixup_cats(struct machine_desc *desc, struct tag *tags,
94            char **cmdline, struct meminfo *mi)
95 {
96         ORIG_VIDEO_LINES  = 25;
97         ORIG_VIDEO_POINTS = 16;
98         ORIG_Y = 24;
99 }
100
101 MACHINE_START(CATS, "Chalice-CATS")
102         MAINTAINER("Philip Blundell")
103         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
104         BOOT_PARAMS(0x00000100)
105         SOFT_REBOOT
106         FIXUP(fixup_cats)
107         MAPIO(footbridge_map_io)
108         INITIRQ(footbridge_init_irq)
109         INITTIME(footbridge_init_time)
110 MACHINE_END
111 #endif
112
113 #ifdef CONFIG_ARCH_CO285
114
115 static void __init
116 fixup_coebsa285(struct machine_desc *desc, struct tag *tags,
117                 char **cmdline, struct meminfo *mi)
118 {
119         extern unsigned long boot_memory_end;
120         extern char boot_command_line[];
121
122         mi->nr_banks      = 1;
123         mi->bank[0].start = PHYS_OFFSET;
124         mi->bank[0].size  = boot_memory_end;
125         mi->bank[0].node  = 0;
126
127         *cmdline = boot_command_line;
128 }
129
130 MACHINE_START(CO285, "co-EBSA285")
131         MAINTAINER("Mark van Doesburg")
132         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000)
133         FIXUP(fixup_coebsa285)
134         MAPIO(footbridge_map_io)
135         INITIRQ(footbridge_init_irq)
136         INITTIME(footbridge_init_time)
137 MACHINE_END
138 #endif
139
140 #ifdef CONFIG_ARCH_PERSONAL_SERVER
141 MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
142         MAINTAINER("Jamey Hicks / George France")
143         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
144         BOOT_PARAMS(0x00000100)
145         MAPIO(footbridge_map_io)
146         INITIRQ(footbridge_init_irq)
147         INITTIME(footbridge_init_time)
148 MACHINE_END
149 #endif