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/jmr3927/setup.c | |
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/jmr3927/setup.c')
-rw-r--r-- | arch/mips/txx9/jmr3927/setup.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/mips/txx9/jmr3927/setup.c b/arch/mips/txx9/jmr3927/setup.c index 7378a835d4e3..cf7513d95fa7 100644 --- a/arch/mips/txx9/jmr3927/setup.c +++ b/arch/mips/txx9/jmr3927/setup.c | |||
@@ -74,9 +74,6 @@ static void __init jmr3927_mem_setup(void) | |||
74 | 74 | ||
75 | _machine_restart = jmr3927_machine_restart; | 75 | _machine_restart = jmr3927_machine_restart; |
76 | 76 | ||
77 | /* Reboot on panic */ | ||
78 | panic_timeout = 180; | ||
79 | |||
80 | /* cache setup */ | 77 | /* cache setup */ |
81 | { | 78 | { |
82 | unsigned int conf; | 79 | unsigned int conf; |
@@ -94,7 +91,8 @@ static void __init jmr3927_mem_setup(void) | |||
94 | #endif | 91 | #endif |
95 | 92 | ||
96 | conf = read_c0_conf(); | 93 | conf = read_c0_conf(); |
97 | conf &= ~(TX39_CONF_ICE | TX39_CONF_DCE | TX39_CONF_WBON | TX39_CONF_CWFON); | 94 | conf &= ~(TX39_CONF_ICE | TX39_CONF_DCE | |
95 | TX39_CONF_WBON | TX39_CONF_CWFON); | ||
98 | conf |= mips_ic_disable ? 0 : TX39_CONF_ICE; | 96 | conf |= mips_ic_disable ? 0 : TX39_CONF_ICE; |
99 | conf |= mips_dc_disable ? 0 : TX39_CONF_DCE; | 97 | conf |= mips_dc_disable ? 0 : TX39_CONF_DCE; |
100 | conf |= mips_config_wbon ? TX39_CONF_WBON : 0; | 98 | conf |= mips_config_wbon ? TX39_CONF_WBON : 0; |
@@ -107,19 +105,11 @@ static void __init jmr3927_mem_setup(void) | |||
107 | /* initialize board */ | 105 | /* initialize board */ |
108 | jmr3927_board_init(); | 106 | jmr3927_board_init(); |
109 | 107 | ||
110 | argptr = prom_getcmdline(); | ||
111 | if ((argptr = strstr(argptr, "ip=")) == NULL) { | ||
112 | argptr = prom_getcmdline(); | ||
113 | strcat(argptr, " ip=bootp"); | ||
114 | } | ||
115 | |||
116 | tx3927_setup_serial(1 << 1); /* ch1: noCTS */ | 108 | tx3927_setup_serial(1 << 1); /* ch1: noCTS */ |
117 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 109 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
118 | argptr = prom_getcmdline(); | 110 | argptr = prom_getcmdline(); |
119 | if ((argptr = strstr(argptr, "console=")) == NULL) { | 111 | if (!strstr(argptr, "console=")) |
120 | argptr = prom_getcmdline(); | ||
121 | strcat(argptr, " console=ttyS1,115200"); | 112 | strcat(argptr, " console=ttyS1,115200"); |
122 | } | ||
123 | #endif | 113 | #endif |
124 | } | 114 | } |
125 | 115 | ||
@@ -199,16 +189,14 @@ static unsigned long jmr3927_swizzle_addr_b(unsigned long port) | |||
199 | #endif | 189 | #endif |
200 | } | 190 | } |
201 | 191 | ||
202 | static int __init jmr3927_rtc_init(void) | 192 | static void __init jmr3927_rtc_init(void) |
203 | { | 193 | { |
204 | static struct resource __initdata res = { | 194 | static struct resource __initdata res = { |
205 | .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE, | 195 | .start = JMR3927_IOC_NVRAMB_ADDR - IO_BASE, |
206 | .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1, | 196 | .end = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1, |
207 | .flags = IORESOURCE_MEM, | 197 | .flags = IORESOURCE_MEM, |
208 | }; | 198 | }; |
209 | struct platform_device *dev; | 199 | platform_device_register_simple("rtc-ds1742", -1, &res, 1); |
210 | dev = platform_device_register_simple("rtc-ds1742", -1, &res, 1); | ||
211 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | ||
212 | } | 200 | } |
213 | 201 | ||
214 | static void __init jmr3927_device_init(void) | 202 | static void __init jmr3927_device_init(void) |