diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-07-15 13:44:33 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-15 13:44:33 -0400 |
commit | 2157bc68711bf0e69f9aca4d310bd863298fbb3f (patch) | |
tree | 782eccb964694e9ffc534f6d970cd8a2bd25ffa0 /arch/mips/mips-boards | |
parent | 372a775f50347f5c1dd87752b16e5c05ea965790 (diff) |
[MIPS] Atlas: Remove support code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mips-boards')
-rw-r--r-- | arch/mips/mips-boards/atlas/Makefile | 22 | ||||
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_gdb.c | 97 | ||||
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_int.c | 272 | ||||
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_setup.c | 82 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/console.c | 11 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/init.c | 8 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/reset.c | 17 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 5 |
8 files changed, 2 insertions, 512 deletions
diff --git a/arch/mips/mips-boards/atlas/Makefile b/arch/mips/mips-boards/atlas/Makefile deleted file mode 100644 index f71c2dd1041a..000000000000 --- a/arch/mips/mips-boards/atlas/Makefile +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | # | ||
2 | # Carsten Langgaard, carstenl@mips.com | ||
3 | # Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
4 | # | ||
5 | # This program is free software; you can distribute it and/or modify it | ||
6 | # under the terms of the GNU General Public License (Version 2) as | ||
7 | # published by the Free Software Foundation. | ||
8 | # | ||
9 | # This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | # for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
17 | # | ||
18 | |||
19 | obj-y := atlas_int.o atlas_setup.o | ||
20 | obj-$(CONFIG_KGDB) += atlas_gdb.o | ||
21 | |||
22 | EXTRA_CFLAGS += -Werror | ||
diff --git a/arch/mips/mips-boards/atlas/atlas_gdb.c b/arch/mips/mips-boards/atlas/atlas_gdb.c deleted file mode 100644 index 00c98cff62dc..000000000000 --- a/arch/mips/mips-boards/atlas/atlas_gdb.c +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | /* | ||
2 | * Carsten Langgaard, carstenl@mips.com | ||
3 | * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. | ||
4 | * | ||
5 | * This program is free software; you can distribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License (Version 2) as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | * for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
17 | * | ||
18 | * This is the interface to the remote debugger stub. | ||
19 | */ | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/mips-boards/atlas.h> | ||
22 | #include <asm/mips-boards/saa9730_uart.h> | ||
23 | |||
24 | #define INB(a) inb((unsigned long)a) | ||
25 | #define OUTB(x, a) outb(x, (unsigned long)a) | ||
26 | |||
27 | /* | ||
28 | * This is the interface to the remote debugger stub | ||
29 | * if the Philips part is used for the debug port, | ||
30 | * called from the platform setup code. | ||
31 | */ | ||
32 | void *saa9730_base = (void *)ATLAS_SAA9730_REG; | ||
33 | |||
34 | static int saa9730_kgdb_active = 0; | ||
35 | |||
36 | #define SAA9730_BAUDCLOCK(baud) (((ATLAS_SAA9730_BAUDCLOCK/(baud))/16)-1) | ||
37 | |||
38 | int saa9730_kgdb_hook(int speed) | ||
39 | { | ||
40 | int baudclock; | ||
41 | t_uart_saa9730_regmap *kgdb_uart = (t_uart_saa9730_regmap *)(saa9730_base + SAA9730_UART_REGS_ADDR); | ||
42 | |||
43 | /* | ||
44 | * Clear all interrupts | ||
45 | */ | ||
46 | (void) INB(&kgdb_uart->Lsr); | ||
47 | (void) INB(&kgdb_uart->Msr); | ||
48 | (void) INB(&kgdb_uart->Thr_Rbr); | ||
49 | (void) INB(&kgdb_uart->Iir_Fcr); | ||
50 | |||
51 | /* | ||
52 | * Now, initialize the UART | ||
53 | */ | ||
54 | /* 8 data bits, one stop bit, no parity */ | ||
55 | OUTB(SAA9730_LCR_DATA8, &kgdb_uart->Lcr); | ||
56 | |||
57 | baudclock = SAA9730_BAUDCLOCK(speed); | ||
58 | |||
59 | OUTB((baudclock >> 16) & 0xff, &kgdb_uart->BaudDivMsb); | ||
60 | OUTB( baudclock & 0xff, &kgdb_uart->BaudDivLsb); | ||
61 | |||
62 | /* Set RTS/DTR active */ | ||
63 | OUTB(SAA9730_MCR_DTR | SAA9730_MCR_RTS, &kgdb_uart->Mcr); | ||
64 | saa9730_kgdb_active = 1; | ||
65 | |||
66 | return speed; | ||
67 | } | ||
68 | |||
69 | int saa9730_putDebugChar(char c) | ||
70 | { | ||
71 | t_uart_saa9730_regmap *kgdb_uart = (t_uart_saa9730_regmap *)(saa9730_base + SAA9730_UART_REGS_ADDR); | ||
72 | |||
73 | if (!saa9730_kgdb_active) { /* need to init device first */ | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | while (!(INB(&kgdb_uart->Lsr) & SAA9730_LSR_THRE)) | ||
78 | ; | ||
79 | OUTB(c, &kgdb_uart->Thr_Rbr); | ||
80 | |||
81 | return 1; | ||
82 | } | ||
83 | |||
84 | char saa9730_getDebugChar(void) | ||
85 | { | ||
86 | t_uart_saa9730_regmap *kgdb_uart = (t_uart_saa9730_regmap *)(saa9730_base + SAA9730_UART_REGS_ADDR); | ||
87 | char c; | ||
88 | |||
89 | if (!saa9730_kgdb_active) { /* need to init device first */ | ||
90 | return 0; | ||
91 | } | ||
92 | while (!(INB(&kgdb_uart->Lsr) & SAA9730_LSR_DR)) | ||
93 | ; | ||
94 | |||
95 | c = INB(&kgdb_uart->Thr_Rbr); | ||
96 | return(c); | ||
97 | } | ||
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c deleted file mode 100644 index 6fb29c3ff62d..000000000000 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ /dev/null | |||
@@ -1,272 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999, 2000, 2006 MIPS Technologies, Inc. | ||
3 | * All rights reserved. | ||
4 | * Authors: Carsten Langgaard <carstenl@mips.com> | ||
5 | * Maciej W. Rozycki <macro@mips.com> | ||
6 | * | ||
7 | * ######################################################################## | ||
8 | * | ||
9 | * This program is free software; you can distribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License (Version 2) as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
16 | * for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
21 | * | ||
22 | * ######################################################################## | ||
23 | * | ||
24 | * Routines for generic manipulation of the interrupts found on the MIPS | ||
25 | * Atlas board. | ||
26 | * | ||
27 | */ | ||
28 | #include <linux/compiler.h> | ||
29 | #include <linux/init.h> | ||
30 | #include <linux/irq.h> | ||
31 | #include <linux/sched.h> | ||
32 | #include <linux/slab.h> | ||
33 | #include <linux/interrupt.h> | ||
34 | #include <linux/kernel_stat.h> | ||
35 | #include <linux/kernel.h> | ||
36 | |||
37 | #include <asm/gdb-stub.h> | ||
38 | #include <asm/io.h> | ||
39 | #include <asm/irq_cpu.h> | ||
40 | #include <asm/msc01_ic.h> | ||
41 | |||
42 | #include <asm/mips-boards/atlas.h> | ||
43 | #include <asm/mips-boards/atlasint.h> | ||
44 | #include <asm/mips-boards/generic.h> | ||
45 | |||
46 | static struct atlas_ictrl_regs *atlas_hw0_icregs; | ||
47 | |||
48 | #if 0 | ||
49 | #define DEBUG_INT(x...) printk(x) | ||
50 | #else | ||
51 | #define DEBUG_INT(x...) | ||
52 | #endif | ||
53 | |||
54 | void disable_atlas_irq(unsigned int irq_nr) | ||
55 | { | ||
56 | atlas_hw0_icregs->intrsten = 1 << (irq_nr - ATLAS_INT_BASE); | ||
57 | iob(); | ||
58 | } | ||
59 | |||
60 | void enable_atlas_irq(unsigned int irq_nr) | ||
61 | { | ||
62 | atlas_hw0_icregs->intseten = 1 << (irq_nr - ATLAS_INT_BASE); | ||
63 | iob(); | ||
64 | } | ||
65 | |||
66 | static void end_atlas_irq(unsigned int irq) | ||
67 | { | ||
68 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
69 | enable_atlas_irq(irq); | ||
70 | } | ||
71 | |||
72 | static struct irq_chip atlas_irq_type = { | ||
73 | .name = "Atlas", | ||
74 | .ack = disable_atlas_irq, | ||
75 | .mask = disable_atlas_irq, | ||
76 | .mask_ack = disable_atlas_irq, | ||
77 | .unmask = enable_atlas_irq, | ||
78 | .eoi = enable_atlas_irq, | ||
79 | .end = end_atlas_irq, | ||
80 | }; | ||
81 | |||
82 | static inline int ls1bit32(unsigned int x) | ||
83 | { | ||
84 | int b = 31, s; | ||
85 | |||
86 | s = 16; if (x << 16 == 0) s = 0; b -= s; x <<= s; | ||
87 | s = 8; if (x << 8 == 0) s = 0; b -= s; x <<= s; | ||
88 | s = 4; if (x << 4 == 0) s = 0; b -= s; x <<= s; | ||
89 | s = 2; if (x << 2 == 0) s = 0; b -= s; x <<= s; | ||
90 | s = 1; if (x << 1 == 0) s = 0; b -= s; | ||
91 | |||
92 | return b; | ||
93 | } | ||
94 | |||
95 | static inline void atlas_hw0_irqdispatch(void) | ||
96 | { | ||
97 | unsigned long int_status; | ||
98 | int irq; | ||
99 | |||
100 | int_status = atlas_hw0_icregs->intstatus; | ||
101 | |||
102 | /* if int_status == 0, then the interrupt has already been cleared */ | ||
103 | if (unlikely(int_status == 0)) | ||
104 | return; | ||
105 | |||
106 | irq = ATLAS_INT_BASE + ls1bit32(int_status); | ||
107 | |||
108 | DEBUG_INT("atlas_hw0_irqdispatch: irq=%d\n", irq); | ||
109 | |||
110 | do_IRQ(irq); | ||
111 | } | ||
112 | |||
113 | static inline int clz(unsigned long x) | ||
114 | { | ||
115 | __asm__( | ||
116 | " .set push \n" | ||
117 | " .set mips32 \n" | ||
118 | " clz %0, %1 \n" | ||
119 | " .set pop \n" | ||
120 | : "=r" (x) | ||
121 | : "r" (x)); | ||
122 | |||
123 | return x; | ||
124 | } | ||
125 | |||
126 | /* | ||
127 | * Version of ffs that only looks at bits 12..15. | ||
128 | */ | ||
129 | static inline unsigned int irq_ffs(unsigned int pending) | ||
130 | { | ||
131 | #if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) | ||
132 | return -clz(pending) + 31 - CAUSEB_IP; | ||
133 | #else | ||
134 | unsigned int a0 = 7; | ||
135 | unsigned int t0; | ||
136 | |||
137 | t0 = s0 & 0xf000; | ||
138 | t0 = t0 < 1; | ||
139 | t0 = t0 << 2; | ||
140 | a0 = a0 - t0; | ||
141 | s0 = s0 << t0; | ||
142 | |||
143 | t0 = s0 & 0xc000; | ||
144 | t0 = t0 < 1; | ||
145 | t0 = t0 << 1; | ||
146 | a0 = a0 - t0; | ||
147 | s0 = s0 << t0; | ||
148 | |||
149 | t0 = s0 & 0x8000; | ||
150 | t0 = t0 < 1; | ||
151 | //t0 = t0 << 2; | ||
152 | a0 = a0 - t0; | ||
153 | //s0 = s0 << t0; | ||
154 | |||
155 | return a0; | ||
156 | #endif | ||
157 | } | ||
158 | |||
159 | /* | ||
160 | * IRQs on the Atlas board look basically like (all external interrupt | ||
161 | * sources are combined together on hardware interrupt 0 (MIPS IRQ 2)): | ||
162 | * | ||
163 | * MIPS IRQ Source | ||
164 | * -------- ------ | ||
165 | * 0 Software 0 (reschedule IPI on MT) | ||
166 | * 1 Software 1 (remote call IPI on MT) | ||
167 | * 2 Combined Atlas hardware interrupt (hw0) | ||
168 | * 3 Hardware (ignored) | ||
169 | * 4 Hardware (ignored) | ||
170 | * 5 Hardware (ignored) | ||
171 | * 6 Hardware (ignored) | ||
172 | * 7 R4k timer (what we use) | ||
173 | * | ||
174 | * We handle the IRQ according to _our_ priority which is: | ||
175 | * | ||
176 | * Highest ---- R4k Timer | ||
177 | * Lowest ---- Software 0 | ||
178 | * | ||
179 | * then we just return, if multiple IRQs are pending then we will just take | ||
180 | * another exception, big deal. | ||
181 | */ | ||
182 | asmlinkage void plat_irq_dispatch(void) | ||
183 | { | ||
184 | unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; | ||
185 | int irq; | ||
186 | |||
187 | irq = irq_ffs(pending); | ||
188 | |||
189 | if (irq == MIPSCPU_INT_ATLAS) | ||
190 | atlas_hw0_irqdispatch(); | ||
191 | else if (irq >= 0) | ||
192 | do_IRQ(MIPS_CPU_IRQ_BASE + irq); | ||
193 | else | ||
194 | spurious_interrupt(); | ||
195 | } | ||
196 | |||
197 | static inline void init_atlas_irqs(int base) | ||
198 | { | ||
199 | int i; | ||
200 | |||
201 | atlas_hw0_icregs = (struct atlas_ictrl_regs *) | ||
202 | ioremap(ATLAS_ICTRL_REGS_BASE, | ||
203 | sizeof(struct atlas_ictrl_regs *)); | ||
204 | |||
205 | /* | ||
206 | * Mask out all interrupt by writing "1" to all bit position in | ||
207 | * the interrupt reset reg. | ||
208 | */ | ||
209 | atlas_hw0_icregs->intrsten = 0xffffffff; | ||
210 | |||
211 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) | ||
212 | set_irq_chip_and_handler(i, &atlas_irq_type, handle_level_irq); | ||
213 | } | ||
214 | |||
215 | static struct irqaction atlasirq = { | ||
216 | .handler = no_action, | ||
217 | .name = "Atlas cascade" | ||
218 | }; | ||
219 | |||
220 | msc_irqmap_t __initdata msc_irqmap[] = { | ||
221 | {MSC01C_INT_TMR, MSC01_IRQ_EDGE, 0}, | ||
222 | {MSC01C_INT_PCI, MSC01_IRQ_LEVEL, 0}, | ||
223 | }; | ||
224 | int __initdata msc_nr_irqs = ARRAY_SIZE(msc_irqmap); | ||
225 | |||
226 | msc_irqmap_t __initdata msc_eicirqmap[] = { | ||
227 | {MSC01E_INT_SW0, MSC01_IRQ_LEVEL, 0}, | ||
228 | {MSC01E_INT_SW1, MSC01_IRQ_LEVEL, 0}, | ||
229 | {MSC01E_INT_ATLAS, MSC01_IRQ_LEVEL, 0}, | ||
230 | {MSC01E_INT_TMR, MSC01_IRQ_EDGE, 0}, | ||
231 | {MSC01E_INT_PCI, MSC01_IRQ_LEVEL, 0}, | ||
232 | {MSC01E_INT_PERFCTR, MSC01_IRQ_LEVEL, 0}, | ||
233 | {MSC01E_INT_CPUCTR, MSC01_IRQ_LEVEL, 0} | ||
234 | }; | ||
235 | int __initdata msc_nr_eicirqs = ARRAY_SIZE(msc_eicirqmap); | ||
236 | |||
237 | void __init arch_init_irq(void) | ||
238 | { | ||
239 | init_atlas_irqs(ATLAS_INT_BASE); | ||
240 | |||
241 | if (!cpu_has_veic) | ||
242 | mips_cpu_irq_init(); | ||
243 | |||
244 | switch(mips_revision_corid) { | ||
245 | case MIPS_REVISION_CORID_CORE_MSC: | ||
246 | case MIPS_REVISION_CORID_CORE_FPGA2: | ||
247 | case MIPS_REVISION_CORID_CORE_FPGA3: | ||
248 | case MIPS_REVISION_CORID_CORE_FPGA4: | ||
249 | case MIPS_REVISION_CORID_CORE_24K: | ||
250 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | ||
251 | if (cpu_has_veic) | ||
252 | init_msc_irqs(MSC01E_INT_BASE, MSC01E_INT_BASE, | ||
253 | msc_eicirqmap, msc_nr_eicirqs); | ||
254 | else | ||
255 | init_msc_irqs(MSC01E_INT_BASE, MSC01C_INT_BASE, | ||
256 | msc_irqmap, msc_nr_irqs); | ||
257 | } | ||
258 | |||
259 | if (cpu_has_veic) { | ||
260 | set_vi_handler(MSC01E_INT_ATLAS, atlas_hw0_irqdispatch); | ||
261 | setup_irq(MSC01E_INT_BASE + MSC01E_INT_ATLAS, &atlasirq); | ||
262 | } else if (cpu_has_vint) { | ||
263 | set_vi_handler(MIPSCPU_INT_ATLAS, atlas_hw0_irqdispatch); | ||
264 | #ifdef CONFIG_MIPS_MT_SMTC | ||
265 | setup_irq_smtc(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, | ||
266 | &atlasirq, (0x100 << MIPSCPU_INT_ATLAS)); | ||
267 | #else /* Not SMTC */ | ||
268 | setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq); | ||
269 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
270 | } else | ||
271 | setup_irq(MIPS_CPU_IRQ_BASE + MIPSCPU_INT_ATLAS, &atlasirq); | ||
272 | } | ||
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c deleted file mode 100644 index 5c500802271e..000000000000 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * Carsten Langgaard, carstenl@mips.com | ||
3 | * Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. | ||
4 | * | ||
5 | * This program is free software; you can distribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License (Version 2) as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
12 | * for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
17 | */ | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/ioport.h> | ||
22 | #include <linux/tty.h> | ||
23 | #include <linux/serial.h> | ||
24 | #include <linux/serial_core.h> | ||
25 | #include <linux/serial_8250.h> | ||
26 | |||
27 | #include <asm/cpu.h> | ||
28 | #include <asm/bootinfo.h> | ||
29 | #include <asm/irq.h> | ||
30 | #include <asm/mips-boards/generic.h> | ||
31 | #include <asm/mips-boards/prom.h> | ||
32 | #include <asm/mips-boards/atlas.h> | ||
33 | #include <asm/mips-boards/atlasint.h> | ||
34 | #include <asm/time.h> | ||
35 | #include <asm/traps.h> | ||
36 | |||
37 | static void __init serial_init(void); | ||
38 | |||
39 | const char *get_system_type(void) | ||
40 | { | ||
41 | return "MIPS Atlas"; | ||
42 | } | ||
43 | |||
44 | const char display_string[] = " LINUX ON ATLAS "; | ||
45 | |||
46 | void __init plat_mem_setup(void) | ||
47 | { | ||
48 | mips_pcibios_init(); | ||
49 | |||
50 | ioport_resource.end = 0x7fffffff; | ||
51 | |||
52 | serial_init(); | ||
53 | |||
54 | #ifdef CONFIG_KGDB | ||
55 | kgdb_config(); | ||
56 | #endif | ||
57 | mips_reboot_setup(); | ||
58 | } | ||
59 | |||
60 | static void __init serial_init(void) | ||
61 | { | ||
62 | #ifdef CONFIG_SERIAL_8250 | ||
63 | struct uart_port s; | ||
64 | |||
65 | memset(&s, 0, sizeof(s)); | ||
66 | |||
67 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | ||
68 | s.iobase = ATLAS_UART_REGS_BASE; | ||
69 | #else | ||
70 | s.iobase = ATLAS_UART_REGS_BASE+3; | ||
71 | #endif | ||
72 | s.irq = ATLAS_INT_UART; | ||
73 | s.uartclk = ATLAS_BASE_BAUD * 16; | ||
74 | s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ; | ||
75 | s.iotype = UPIO_PORT; | ||
76 | s.regshift = 3; | ||
77 | |||
78 | if (early_serial_setup(&s) != 0) { | ||
79 | printk(KERN_ERR "Serial setup failed!\n"); | ||
80 | } | ||
81 | #endif | ||
82 | } | ||
diff --git a/arch/mips/mips-boards/generic/console.c b/arch/mips/mips-boards/generic/console.c index 4d8ab99e4155..4a2aecc6da1b 100644 --- a/arch/mips/mips-boards/generic/console.c +++ b/arch/mips/mips-boards/generic/console.c | |||
@@ -22,16 +22,7 @@ | |||
22 | #include <linux/serial_reg.h> | 22 | #include <linux/serial_reg.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | 24 | ||
25 | #ifdef CONFIG_MIPS_ATLAS | 25 | #if defined(CONFIG_MIPS_SEAD) |
26 | #include <asm/mips-boards/atlas.h> | ||
27 | |||
28 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | ||
29 | #define PORT(offset) (ATLAS_UART_REGS_BASE + ((offset)<<3)) | ||
30 | #else | ||
31 | #define PORT(offset) (ATLAS_UART_REGS_BASE + 3 + ((offset)<<3)) | ||
32 | #endif | ||
33 | |||
34 | #elif defined(CONFIG_MIPS_SEAD) | ||
35 | 26 | ||
36 | #include <asm/mips-boards/sead.h> | 27 | #include <asm/mips-boards/sead.h> |
37 | 28 | ||
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 83b9dc739203..bac23b5fbf3f 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -197,14 +197,6 @@ void __init kgdb_config(void) | |||
197 | while ((c = *++argptr) && ('0' <= c && c <= '9')) | 197 | while ((c = *++argptr) && ('0' <= c && c <= '9')) |
198 | speed = speed * 10 + c - '0'; | 198 | speed = speed * 10 + c - '0'; |
199 | } | 199 | } |
200 | #ifdef CONFIG_MIPS_ATLAS | ||
201 | if (line == 1) { | ||
202 | speed = saa9730_kgdb_hook(speed); | ||
203 | generic_putDebugChar = saa9730_putDebugChar; | ||
204 | generic_getDebugChar = saa9730_getDebugChar; | ||
205 | } | ||
206 | else | ||
207 | #endif | ||
208 | { | 200 | { |
209 | speed = rs_kgdb_hook(line, speed); | 201 | speed = rs_kgdb_hook(line, speed); |
210 | generic_putDebugChar = rs_putDebugChar; | 202 | generic_putDebugChar = rs_putDebugChar; |
diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c index 583d468d98a9..5f73ff6180eb 100644 --- a/arch/mips/mips-boards/generic/reset.c +++ b/arch/mips/mips-boards/generic/reset.c | |||
@@ -27,15 +27,9 @@ | |||
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/reboot.h> | 28 | #include <asm/reboot.h> |
29 | #include <asm/mips-boards/generic.h> | 29 | #include <asm/mips-boards/generic.h> |
30 | #if defined(CONFIG_MIPS_ATLAS) | ||
31 | #include <asm/mips-boards/atlas.h> | ||
32 | #endif | ||
33 | 30 | ||
34 | static void mips_machine_restart(char *command); | 31 | static void mips_machine_restart(char *command); |
35 | static void mips_machine_halt(void); | 32 | static void mips_machine_halt(void); |
36 | #if defined(CONFIG_MIPS_ATLAS) | ||
37 | static void atlas_machine_power_off(void); | ||
38 | #endif | ||
39 | 33 | ||
40 | static void mips_machine_restart(char *command) | 34 | static void mips_machine_restart(char *command) |
41 | { | 35 | { |
@@ -53,22 +47,11 @@ static void mips_machine_halt(void) | |||
53 | __raw_writel(GORESET, softres_reg); | 47 | __raw_writel(GORESET, softres_reg); |
54 | } | 48 | } |
55 | 49 | ||
56 | #if defined(CONFIG_MIPS_ATLAS) | ||
57 | static void atlas_machine_power_off(void) | ||
58 | { | ||
59 | unsigned int __iomem *psustby_reg = ioremap(ATLAS_PSUSTBY_REG, sizeof(unsigned int)); | ||
60 | |||
61 | writew(ATLAS_GOSTBY, psustby_reg); | ||
62 | } | ||
63 | #endif | ||
64 | 50 | ||
65 | void mips_reboot_setup(void) | 51 | void mips_reboot_setup(void) |
66 | { | 52 | { |
67 | _machine_restart = mips_machine_restart; | 53 | _machine_restart = mips_machine_restart; |
68 | _machine_halt = mips_machine_halt; | 54 | _machine_halt = mips_machine_halt; |
69 | #if defined(CONFIG_MIPS_ATLAS) | ||
70 | pm_power_off = atlas_machine_power_off; | ||
71 | #endif | ||
72 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_SEAD) | 55 | #if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_SEAD) |
73 | pm_power_off = mips_machine_halt; | 56 | pm_power_off = mips_machine_halt; |
74 | #endif | 57 | #endif |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index fe2cac1b4514..d224267846b0 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -42,9 +42,6 @@ | |||
42 | #include <asm/mips-boards/generic.h> | 42 | #include <asm/mips-boards/generic.h> |
43 | #include <asm/mips-boards/prom.h> | 43 | #include <asm/mips-boards/prom.h> |
44 | 44 | ||
45 | #ifdef CONFIG_MIPS_ATLAS | ||
46 | #include <asm/mips-boards/atlasint.h> | ||
47 | #endif | ||
48 | #ifdef CONFIG_MIPS_MALTA | 45 | #ifdef CONFIG_MIPS_MALTA |
49 | #include <asm/mips-boards/maltaint.h> | 46 | #include <asm/mips-boards/maltaint.h> |
50 | #endif | 47 | #endif |
@@ -89,7 +86,7 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
89 | else | 86 | else |
90 | count = 6000000; | 87 | count = 6000000; |
91 | #endif | 88 | #endif |
92 | #if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_MALTA) | 89 | #ifdef CONFIG_MIPS_MALTA |
93 | unsigned long flags; | 90 | unsigned long flags; |
94 | unsigned int start; | 91 | unsigned int start; |
95 | 92 | ||