aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/rbtx4927/setup.c
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-23 11:25:21 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-30 16:54:40 -0400
commitbb72f1f729dcbd6a6a93c74479eeaa19deebfb47 (patch)
tree2432e241d81a63192dc2441f5fa95770f13a12df /arch/mips/txx9/rbtx4927/setup.c
parentc49f91f51e3cca796494f69fd967a7f72df5d457 (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/setup.c')
-rw-r--r--arch/mips/txx9/rbtx4927/setup.c38
1 files changed, 7 insertions, 31 deletions
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
301static int __init toshiba_rbtx4927_rtc_init(void) 282static 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
313static int __init rbtx4927_ne_init(void) 292static 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
331static void __init rbtx4927_device_init(void) 307static void __init rbtx4927_device_init(void)