diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-23 11:25:21 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-30 16:54:40 -0400 |
commit | bb72f1f729dcbd6a6a93c74479eeaa19deebfb47 (patch) | |
tree | 2432e241d81a63192dc2441f5fa95770f13a12df /arch/mips/txx9/rbtx4927 | |
parent | c49f91f51e3cca796494f69fd967a7f72df5d457 (diff) |
[MIPS] TXx9: Random cleanup
* Random cleanups spotted by checkpatch script.
* Do not initialize panic_timeout. "panic=" kernel parameter can be used.
* Do not add "ip=any" or "ip=bootp". This options is not board specific.
* Do not add "root=/dev/nfs". This is default on CONFIG_ROOT_NFS.
* Kill unused error checking.
* Fix IRQ comment to match current code.
* Kill some unneeded includes
* ST0_ERL is already cleared in generic code.
* conswitchp is initialized generic code.
* __init is not needed in prototype.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/rbtx4927')
-rw-r--r-- | arch/mips/txx9/rbtx4927/irq.c | 161 | ||||
-rw-r--r-- | arch/mips/txx9/rbtx4927/setup.c | 38 |
2 files changed, 88 insertions, 111 deletions
diff --git a/arch/mips/txx9/rbtx4927/irq.c b/arch/mips/txx9/rbtx4927/irq.c index cd748a930328..00cd5231da30 100644 --- a/arch/mips/txx9/rbtx4927/irq.c +++ b/arch/mips/txx9/rbtx4927/irq.c | |||
@@ -27,85 +27,86 @@ | |||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
28 | */ | 28 | */ |
29 | /* | 29 | /* |
30 | IRQ Device | 30 | * I8259A_IRQ_BASE+00 |
31 | 00 RBTX4927-ISA/00 | 31 | * I8259A_IRQ_BASE+01 PS2/Keyboard |
32 | 01 RBTX4927-ISA/01 PS2/Keyboard | 32 | * I8259A_IRQ_BASE+02 Cascade RBTX4927-ISA (irqs 8-15) |
33 | 02 RBTX4927-ISA/02 Cascade RBTX4927-ISA (irqs 8-15) | 33 | * I8259A_IRQ_BASE+03 |
34 | 03 RBTX4927-ISA/03 | 34 | * I8259A_IRQ_BASE+04 |
35 | 04 RBTX4927-ISA/04 | 35 | * I8259A_IRQ_BASE+05 |
36 | 05 RBTX4927-ISA/05 | 36 | * I8259A_IRQ_BASE+06 |
37 | 06 RBTX4927-ISA/06 | 37 | * I8259A_IRQ_BASE+07 |
38 | 07 RBTX4927-ISA/07 | 38 | * I8259A_IRQ_BASE+08 |
39 | 08 RBTX4927-ISA/08 | 39 | * I8259A_IRQ_BASE+09 |
40 | 09 RBTX4927-ISA/09 | 40 | * I8259A_IRQ_BASE+10 |
41 | 10 RBTX4927-ISA/10 | 41 | * I8259A_IRQ_BASE+11 |
42 | 11 RBTX4927-ISA/11 | 42 | * I8259A_IRQ_BASE+12 PS2/Mouse (not supported at this time) |
43 | 12 RBTX4927-ISA/12 PS2/Mouse (not supported at this time) | 43 | * I8259A_IRQ_BASE+13 |
44 | 13 RBTX4927-ISA/13 | 44 | * I8259A_IRQ_BASE+14 IDE |
45 | 14 RBTX4927-ISA/14 IDE | 45 | * I8259A_IRQ_BASE+15 |
46 | 15 RBTX4927-ISA/15 | 46 | * |
47 | 47 | * MIPS_CPU_IRQ_BASE+00 Software 0 | |
48 | 16 TX4927-CP0/00 Software 0 | 48 | * MIPS_CPU_IRQ_BASE+01 Software 1 |
49 | 17 TX4927-CP0/01 Software 1 | 49 | * MIPS_CPU_IRQ_BASE+02 Cascade TX4927-CP0 |
50 | 18 TX4927-CP0/02 Cascade TX4927-CP0 | 50 | * MIPS_CPU_IRQ_BASE+03 Multiplexed -- do not use |
51 | 19 TX4927-CP0/03 Multiplexed -- do not use | 51 | * MIPS_CPU_IRQ_BASE+04 Multiplexed -- do not use |
52 | 20 TX4927-CP0/04 Multiplexed -- do not use | 52 | * MIPS_CPU_IRQ_BASE+05 Multiplexed -- do not use |
53 | 21 TX4927-CP0/05 Multiplexed -- do not use | 53 | * MIPS_CPU_IRQ_BASE+06 Multiplexed -- do not use |
54 | 22 TX4927-CP0/06 Multiplexed -- do not use | 54 | * MIPS_CPU_IRQ_BASE+07 CPU TIMER |
55 | 23 TX4927-CP0/07 CPU TIMER | 55 | * |
56 | 56 | * TXX9_IRQ_BASE+00 | |
57 | 24 TX4927-PIC/00 | 57 | * TXX9_IRQ_BASE+01 |
58 | 25 TX4927-PIC/01 | 58 | * TXX9_IRQ_BASE+02 |
59 | 26 TX4927-PIC/02 | 59 | * TXX9_IRQ_BASE+03 Cascade RBTX4927-IOC |
60 | 27 TX4927-PIC/03 Cascade RBTX4927-IOC | 60 | * TXX9_IRQ_BASE+04 |
61 | 28 TX4927-PIC/04 | 61 | * TXX9_IRQ_BASE+05 RBTX4927 RTL-8019AS ethernet |
62 | 29 TX4927-PIC/05 RBTX4927 RTL-8019AS ethernet | 62 | * TXX9_IRQ_BASE+06 |
63 | 30 TX4927-PIC/06 | 63 | * TXX9_IRQ_BASE+07 |
64 | 31 TX4927-PIC/07 | 64 | * TXX9_IRQ_BASE+08 TX4927 SerialIO Channel 0 |
65 | 32 TX4927-PIC/08 TX4927 SerialIO Channel 0 | 65 | * TXX9_IRQ_BASE+09 TX4927 SerialIO Channel 1 |
66 | 33 TX4927-PIC/09 TX4927 SerialIO Channel 1 | 66 | * TXX9_IRQ_BASE+10 |
67 | 34 TX4927-PIC/10 | 67 | * TXX9_IRQ_BASE+11 |
68 | 35 TX4927-PIC/11 | 68 | * TXX9_IRQ_BASE+12 |
69 | 36 TX4927-PIC/12 | 69 | * TXX9_IRQ_BASE+13 |
70 | 37 TX4927-PIC/13 | 70 | * TXX9_IRQ_BASE+14 |
71 | 38 TX4927-PIC/14 | 71 | * TXX9_IRQ_BASE+15 |
72 | 39 TX4927-PIC/15 | 72 | * TXX9_IRQ_BASE+16 TX4927 PCI PCI-C |
73 | 40 TX4927-PIC/16 TX4927 PCI PCI-C | 73 | * TXX9_IRQ_BASE+17 |
74 | 41 TX4927-PIC/17 | 74 | * TXX9_IRQ_BASE+18 |
75 | 42 TX4927-PIC/18 | 75 | * TXX9_IRQ_BASE+19 |
76 | 43 TX4927-PIC/19 | 76 | * TXX9_IRQ_BASE+20 |
77 | 44 TX4927-PIC/20 | 77 | * TXX9_IRQ_BASE+21 |
78 | 45 TX4927-PIC/21 | 78 | * TXX9_IRQ_BASE+22 TX4927 PCI PCI-ERR |
79 | 46 TX4927-PIC/22 TX4927 PCI PCI-ERR | 79 | * TXX9_IRQ_BASE+23 TX4927 PCI PCI-PMA (not used) |
80 | 47 TX4927-PIC/23 TX4927 PCI PCI-PMA (not used) | 80 | * TXX9_IRQ_BASE+24 |
81 | 48 TX4927-PIC/24 | 81 | * TXX9_IRQ_BASE+25 |
82 | 49 TX4927-PIC/25 | 82 | * TXX9_IRQ_BASE+26 |
83 | 50 TX4927-PIC/26 | 83 | * TXX9_IRQ_BASE+27 |
84 | 51 TX4927-PIC/27 | 84 | * TXX9_IRQ_BASE+28 |
85 | 52 TX4927-PIC/28 | 85 | * TXX9_IRQ_BASE+29 |
86 | 53 TX4927-PIC/29 | 86 | * TXX9_IRQ_BASE+30 |
87 | 54 TX4927-PIC/30 | 87 | * TXX9_IRQ_BASE+31 |
88 | 55 TX4927-PIC/31 | 88 | * |
89 | 89 | * RBTX4927_IRQ_IOC+00 FPCIB0 PCI-D (SouthBridge) | |
90 | 56 RBTX4927-IOC/00 FPCIB0 PCI-D PJ4/A PJ5/B SB/C PJ6/D PJ7/A (SouthBridge/NotUsed) [RTL-8139=PJ4] | 90 | * RBTX4927_IRQ_IOC+01 FPCIB0 PCI-C (SouthBridge) |
91 | 57 RBTX4927-IOC/01 FPCIB0 PCI-C PJ4/D PJ5/A SB/B PJ6/C PJ7/D (SouthBridge/NotUsed) [RTL-8139=PJ5] | 91 | * RBTX4927_IRQ_IOC+02 FPCIB0 PCI-B (SouthBridge/IDE/pin=1,INTR) |
92 | 58 RBTX4927-IOC/02 FPCIB0 PCI-B PJ4/C PJ5/D SB/A PJ6/B PJ7/C (SouthBridge/IDE/pin=1,INTR) [RTL-8139=NotSupported] | 92 | * RBTX4927_IRQ_IOC+03 FPCIB0 PCI-A (SouthBridge/USB/pin=4) |
93 | 59 RBTX4927-IOC/03 FPCIB0 PCI-A PJ4/B PJ5/C SB/D PJ6/A PJ7/B (SouthBridge/USB/pin=4) [RTL-8139=PJ6] | 93 | * RBTX4927_IRQ_IOC+04 |
94 | 60 RBTX4927-IOC/04 | 94 | * RBTX4927_IRQ_IOC+05 |
95 | 61 RBTX4927-IOC/05 | 95 | * RBTX4927_IRQ_IOC+06 |
96 | 62 RBTX4927-IOC/06 | 96 | * RBTX4927_IRQ_IOC+07 |
97 | 63 RBTX4927-IOC/07 | 97 | * |
98 | 98 | * NOTES: | |
99 | NOTES: | 99 | * SouthBridge/INTR is mapped to SouthBridge/A=PCI-B/#58 |
100 | SouthBridge/INTR is mapped to SouthBridge/A=PCI-B/#58 | 100 | * SouthBridge/ISA/pin=0 no pci irq used by this device |
101 | SouthBridge/ISA/pin=0 no pci irq used by this device | 101 | * SouthBridge/IDE/pin=1 no pci irq used by this device, using INTR |
102 | SouthBridge/IDE/pin=1 no pci irq used by this device, using INTR via ISA IRQ14 | 102 | * via ISA IRQ14 |
103 | SouthBridge/USB/pin=4 using pci irq SouthBridge/D=PCI-A=#59 | 103 | * SouthBridge/USB/pin=4 using pci irq SouthBridge/D=PCI-A=#59 |
104 | SouthBridge/PMC/pin=0 no pci irq used by this device | 104 | * SouthBridge/PMC/pin=0 no pci irq used by this device |
105 | SuperIO/PS2/Keyboard, using INTR via ISA IRQ1 | 105 | * SuperIO/PS2/Keyboard, using INTR via ISA IRQ1 |
106 | SuperIO/PS2/Mouse, using INTR via ISA IRQ12 (mouse not currently supported) | 106 | * SuperIO/PS2/Mouse, using INTR via ISA IRQ12 (mouse not currently supported) |
107 | JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthBridge, JP4, JP5, JP6 | 107 | * JP7 is not bus master -- do NOT use -- only 4 pci bus master's |
108 | */ | 108 | * allowed -- SouthBridge, JP4, JP5, JP6 |
109 | */ | ||
109 | 110 | ||
110 | #include <linux/init.h> | 111 | #include <linux/init.h> |
111 | #include <linux/types.h> | 112 | #include <linux/types.h> |
@@ -134,7 +135,7 @@ static int toshiba_rbtx4927_irq_nested(int sw_irq) | |||
134 | level3 = readb(rbtx4927_imstat_addr) & 0x1f; | 135 | level3 = readb(rbtx4927_imstat_addr) & 0x1f; |
135 | if (level3) | 136 | if (level3) |
136 | sw_irq = RBTX4927_IRQ_IOC + fls(level3) - 1; | 137 | sw_irq = RBTX4927_IRQ_IOC + fls(level3) - 1; |
137 | return (sw_irq); | 138 | return sw_irq; |
138 | } | 139 | } |
139 | 140 | ||
140 | static void __init toshiba_rbtx4927_irq_ioc_init(void) | 141 | static void __init toshiba_rbtx4927_irq_ioc_init(void) |
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c index f01af382e9a8..962ada57d12d 100644 --- a/arch/mips/txx9/rbtx4927/setup.c +++ b/arch/mips/txx9/rbtx4927/setup.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/types.h> | 47 | #include <linux/types.h> |
48 | #include <linux/ioport.h> | 48 | #include <linux/ioport.h> |
49 | #include <linux/interrupt.h> | ||
50 | #include <linux/platform_device.h> | 49 | #include <linux/platform_device.h> |
51 | #include <linux/delay.h> | 50 | #include <linux/delay.h> |
52 | #include <asm/io.h> | 51 | #include <asm/io.h> |
@@ -189,9 +188,6 @@ static void __init rbtx4927_mem_setup(void) | |||
189 | u32 cp0_config; | 188 | u32 cp0_config; |
190 | char *argptr; | 189 | char *argptr; |
191 | 190 | ||
192 | /* f/w leaves this on at startup */ | ||
193 | clear_c0_status(ST0_ERL); | ||
194 | |||
195 | /* enable caches -- HCP5 does this, pmon does not */ | 191 | /* enable caches -- HCP5 does this, pmon does not */ |
196 | cp0_config = read_c0_config(); | 192 | cp0_config = read_c0_config(); |
197 | cp0_config = cp0_config & ~(TX49_CONF_IC | TX49_CONF_DC); | 193 | cp0_config = cp0_config & ~(TX49_CONF_IC | TX49_CONF_DC); |
@@ -218,24 +214,9 @@ static void __init rbtx4927_mem_setup(void) | |||
218 | 214 | ||
219 | tx4927_setup_serial(); | 215 | tx4927_setup_serial(); |
220 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 216 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
221 | argptr = prom_getcmdline(); | 217 | argptr = prom_getcmdline(); |
222 | if (strstr(argptr, "console=") == NULL) { | 218 | if (!strstr(argptr, "console=")) |
223 | strcat(argptr, " console=ttyS0,38400"); | 219 | strcat(argptr, " console=ttyS0,38400"); |
224 | } | ||
225 | #endif | ||
226 | |||
227 | #ifdef CONFIG_ROOT_NFS | ||
228 | argptr = prom_getcmdline(); | ||
229 | if (strstr(argptr, "root=") == NULL) { | ||
230 | strcat(argptr, " root=/dev/nfs rw"); | ||
231 | } | ||
232 | #endif | ||
233 | |||
234 | #ifdef CONFIG_IP_PNP | ||
235 | argptr = prom_getcmdline(); | ||
236 | if (strstr(argptr, "ip=") == NULL) { | ||
237 | strcat(argptr, " ip=any"); | ||
238 | } | ||
239 | #endif | 220 | #endif |
240 | } | 221 | } |
241 | 222 | ||
@@ -298,19 +279,17 @@ static void __init rbtx4927_time_init(void) | |||
298 | tx4927_time_init(0); | 279 | tx4927_time_init(0); |
299 | } | 280 | } |
300 | 281 | ||
301 | static int __init toshiba_rbtx4927_rtc_init(void) | 282 | static void __init toshiba_rbtx4927_rtc_init(void) |
302 | { | 283 | { |
303 | struct resource res = { | 284 | struct resource res = { |
304 | .start = RBTX4927_BRAMRTC_BASE - IO_BASE, | 285 | .start = RBTX4927_BRAMRTC_BASE - IO_BASE, |
305 | .end = RBTX4927_BRAMRTC_BASE - IO_BASE + 0x800 - 1, | 286 | .end = RBTX4927_BRAMRTC_BASE - IO_BASE + 0x800 - 1, |
306 | .flags = IORESOURCE_MEM, | 287 | .flags = IORESOURCE_MEM, |
307 | }; | 288 | }; |
308 | struct platform_device *dev = | 289 | platform_device_register_simple("rtc-ds1742", -1, &res, 1); |
309 | platform_device_register_simple("rtc-ds1742", -1, &res, 1); | ||
310 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | ||
311 | } | 290 | } |
312 | 291 | ||
313 | static int __init rbtx4927_ne_init(void) | 292 | static void __init rbtx4927_ne_init(void) |
314 | { | 293 | { |
315 | struct resource res[] = { | 294 | struct resource res[] = { |
316 | { | 295 | { |
@@ -322,10 +301,7 @@ static int __init rbtx4927_ne_init(void) | |||
322 | .flags = IORESOURCE_IRQ, | 301 | .flags = IORESOURCE_IRQ, |
323 | } | 302 | } |
324 | }; | 303 | }; |
325 | struct platform_device *dev = | 304 | platform_device_register_simple("ne", -1, res, ARRAY_SIZE(res)); |
326 | platform_device_register_simple("ne", -1, | ||
327 | res, ARRAY_SIZE(res)); | ||
328 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | ||
329 | } | 305 | } |
330 | 306 | ||
331 | static void __init rbtx4927_device_init(void) | 307 | static void __init rbtx4927_device_init(void) |