v2.4.8 -> v2.4.8.1
[opensuse:kernel.git] / 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
26 unsigned int mem_fclk_21285 = 50000000;
27
28 EXPORT_SYMBOL(mem_fclk_21285);
29
30 static int __init parse_tag_memclk(const struct tag *tag)
31 {
32         mem_fclk_21285 = tag->u.memclk.fmemclk;
33         return 0;
34 }
35
36 __tagtable(ATAG_MEMCLK, parse_tag_memclk);
37
38 #ifdef CONFIG_ARCH_EBSA285
39
40 static void __init
41 fixup_ebsa285(struct machine_desc *desc, struct param_struct *params,
42               char **cmdline, struct meminfo *mi)
43 {
44         ORIG_X           = params->u1.s.video_x;
45         ORIG_Y           = params->u1.s.video_y;
46         ORIG_VIDEO_COLS  = params->u1.s.video_num_cols;
47         ORIG_VIDEO_LINES = params->u1.s.video_num_rows;
48 }
49
50 MACHINE_START(EBSA285, "EBSA285")
51         MAINTAINER("Russell King")
52         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
53         BOOT_PARAMS(0x00000100)
54         VIDEO(0x000a0000, 0x000bffff)
55         FIXUP(fixup_ebsa285)
56         MAPIO(footbridge_map_io)
57         INITIRQ(footbridge_init_irq)
58 MACHINE_END
59 #endif
60
61 #ifdef CONFIG_ARCH_NETWINDER
62 /*
63  * Older NeTTroms either do not provide a parameters
64  * page, or they don't supply correct information in
65  * the parameter page.
66  */
67 static void __init
68 fixup_netwinder(struct machine_desc *desc, struct param_struct *params,
69                 char **cmdline, struct meminfo *mi)
70 {
71 #ifdef CONFIG_ISAPNP
72         extern int isapnp_disable;
73
74         /*
75          * We must not use the kernels ISAPnP code
76          * on the NetWinder - it will reset the settings
77          * for the WaveArtist chip and render it inoperable.
78          */
79         isapnp_disable = 1;
80 #endif
81
82         if (params->u1.s.nr_pages != 0x02000 &&
83             params->u1.s.nr_pages != 0x04000 &&
84             params->u1.s.nr_pages != 0x08000 &&
85             params->u1.s.nr_pages != 0x10000) {
86                 printk(KERN_WARNING "Warning: bad NeTTrom parameters "
87                        "detected, using defaults\n");
88
89                 params->u1.s.nr_pages = 0x1000; /* 16MB */
90                 params->u1.s.ramdisk_size = 0;
91                 params->u1.s.flags = FLAG_READONLY;
92                 params->u1.s.initrd_start = 0;
93                 params->u1.s.initrd_size = 0;
94                 params->u1.s.rd_start = 0;
95         }
96 }
97
98 MACHINE_START(NETWINDER, "Rebel-NetWinder")
99         MAINTAINER("Russell King/Rebel.com")
100         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
101         BOOT_PARAMS(0x00000100)
102         VIDEO(0x000a0000, 0x000bffff)
103         DISABLE_PARPORT(0)
104         DISABLE_PARPORT(2)
105         FIXUP(fixup_netwinder)
106         MAPIO(footbridge_map_io)
107         INITIRQ(footbridge_init_irq)
108 MACHINE_END
109 #endif
110
111 #ifdef CONFIG_ARCH_CATS
112 /*
113  * CATS uses soft-reboot by default, since
114  * hard reboots fail on early boards.
115  */
116 static void __init
117 fixup_cats(struct machine_desc *desc, struct param_struct *unused,
118            char **cmdline, struct meminfo *mi)
119 {
120         ORIG_VIDEO_LINES  = 25;
121         ORIG_VIDEO_POINTS = 16;
122         ORIG_Y = 24;
123 }
124
125 MACHINE_START(CATS, "Chalice-CATS")
126         MAINTAINER("Philip Blundell")
127         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
128         BOOT_PARAMS(0x00000100)
129         SOFT_REBOOT
130         FIXUP(fixup_cats)
131         MAPIO(footbridge_map_io)
132         INITIRQ(footbridge_init_irq)
133 MACHINE_END
134 #endif
135
136 #ifdef CONFIG_ARCH_CO285
137
138 static void __init
139 fixup_coebsa285(struct machine_desc *desc, struct param_struct *unused,
140                 char **cmdline, struct meminfo *mi)
141 {
142         extern unsigned long boot_memory_end;
143         extern char boot_command_line[];
144
145         mi->nr_banks      = 1;
146         mi->bank[0].start = PHYS_OFFSET;
147         mi->bank[0].size  = boot_memory_end;
148         mi->bank[0].node  = 0;
149
150         *cmdline = boot_command_line;
151 }
152
153 MACHINE_START(CO285, "co-EBSA285")
154         MAINTAINER("Mark van Doesburg")
155         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000)
156         FIXUP(fixup_coebsa285)
157         MAPIO(footbridge_map_io)
158         INITIRQ(footbridge_init_irq)
159 MACHINE_END
160 #endif
161
162 #ifdef CONFIG_ARCH_PERSONAL_SERVER
163 MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
164         MAINTAINER("Jamey Hicks / George France")
165         BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000)
166         BOOT_PARAMS(0x00000100)
167         MAPIO(footbridge_map_io)
168         INITIRQ(footbridge_init_irq)
169 MACHINE_END
170 #endif