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/rbtx4938/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/rbtx4938/setup.c')
-rw-r--r-- | arch/mips/txx9/rbtx4938/setup.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c index 3324a70a6b7a..5c05a21b33f5 100644 --- a/arch/mips/txx9/rbtx4938/setup.c +++ b/arch/mips/txx9/rbtx4938/setup.c | |||
@@ -13,8 +13,6 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/console.h> | ||
18 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
19 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
20 | 18 | ||
@@ -169,45 +167,29 @@ static void __init rbtx4938_mem_setup(void) | |||
169 | 167 | ||
170 | tx4938_setup_serial(); | 168 | tx4938_setup_serial(); |
171 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE | 169 | #ifdef CONFIG_SERIAL_TXX9_CONSOLE |
172 | argptr = prom_getcmdline(); | 170 | argptr = prom_getcmdline(); |
173 | if (strstr(argptr, "console=") == NULL) { | 171 | if (!strstr(argptr, "console=")) |
174 | strcat(argptr, " console=ttyS0,38400"); | 172 | strcat(argptr, " console=ttyS0,38400"); |
175 | } | ||
176 | #endif | 173 | #endif |
177 | 174 | ||
178 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_PIO58_61 | 175 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_PIO58_61 |
179 | printk("PIOSEL: disabling both ata and nand selection\n"); | 176 | printk(KERN_INFO "PIOSEL: disabling both ata and nand selection\n"); |
180 | local_irq_disable(); | ||
181 | txx9_clear64(&tx4938_ccfgptr->pcfg, | 177 | txx9_clear64(&tx4938_ccfgptr->pcfg, |
182 | TX4938_PCFG_NDF_SEL | TX4938_PCFG_ATA_SEL); | 178 | TX4938_PCFG_NDF_SEL | TX4938_PCFG_ATA_SEL); |
183 | #endif | 179 | #endif |
184 | 180 | ||
185 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND | 181 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND |
186 | printk("PIOSEL: enabling nand selection\n"); | 182 | printk(KERN_INFO "PIOSEL: enabling nand selection\n"); |
187 | txx9_set64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_NDF_SEL); | 183 | txx9_set64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_NDF_SEL); |
188 | txx9_clear64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_ATA_SEL); | 184 | txx9_clear64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_ATA_SEL); |
189 | #endif | 185 | #endif |
190 | 186 | ||
191 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_ATA | 187 | #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_ATA |
192 | printk("PIOSEL: enabling ata selection\n"); | 188 | printk(KERN_INFO "PIOSEL: enabling ata selection\n"); |
193 | txx9_set64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_ATA_SEL); | 189 | txx9_set64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_ATA_SEL); |
194 | txx9_clear64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_NDF_SEL); | 190 | txx9_clear64(&tx4938_ccfgptr->pcfg, TX4938_PCFG_NDF_SEL); |
195 | #endif | 191 | #endif |
196 | 192 | ||
197 | #ifdef CONFIG_IP_PNP | ||
198 | argptr = prom_getcmdline(); | ||
199 | if (strstr(argptr, "ip=") == NULL) { | ||
200 | strcat(argptr, " ip=any"); | ||
201 | } | ||
202 | #endif | ||
203 | |||
204 | |||
205 | #ifdef CONFIG_FB | ||
206 | { | ||
207 | conswitchp = &dummy_con; | ||
208 | } | ||
209 | #endif | ||
210 | |||
211 | rbtx4938_spi_setup(); | 193 | rbtx4938_spi_setup(); |
212 | pcfg = ____raw_readq(&tx4938_ccfgptr->pcfg); /* updated */ | 194 | pcfg = ____raw_readq(&tx4938_ccfgptr->pcfg); /* updated */ |
213 | /* fixup piosel */ | 195 | /* fixup piosel */ |
@@ -228,7 +210,7 @@ static void __init rbtx4938_mem_setup(void) | |||
228 | rbtx4938_fpga_resource.end = CPHYSADDR(RBTX4938_FPGA_REG_ADDR) + 0xffff; | 210 | rbtx4938_fpga_resource.end = CPHYSADDR(RBTX4938_FPGA_REG_ADDR) + 0xffff; |
229 | rbtx4938_fpga_resource.flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 211 | rbtx4938_fpga_resource.flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
230 | if (request_resource(&txx9_ce_res[2], &rbtx4938_fpga_resource)) | 212 | if (request_resource(&txx9_ce_res[2], &rbtx4938_fpga_resource)) |
231 | printk("request resource for fpga failed\n"); | 213 | printk(KERN_ERR "request resource for fpga failed\n"); |
232 | 214 | ||
233 | _machine_restart = rbtx4938_machine_restart; | 215 | _machine_restart = rbtx4938_machine_restart; |
234 | 216 | ||
@@ -238,7 +220,7 @@ static void __init rbtx4938_mem_setup(void) | |||
238 | readb(rbtx4938_dipsw_addr), readb(rbtx4938_bdipsw_addr)); | 220 | readb(rbtx4938_dipsw_addr), readb(rbtx4938_bdipsw_addr)); |
239 | } | 221 | } |
240 | 222 | ||
241 | static int __init rbtx4938_ne_init(void) | 223 | static void __init rbtx4938_ne_init(void) |
242 | { | 224 | { |
243 | struct resource res[] = { | 225 | struct resource res[] = { |
244 | { | 226 | { |
@@ -250,10 +232,7 @@ static int __init rbtx4938_ne_init(void) | |||
250 | .flags = IORESOURCE_IRQ, | 232 | .flags = IORESOURCE_IRQ, |
251 | } | 233 | } |
252 | }; | 234 | }; |
253 | struct platform_device *dev = | 235 | platform_device_register_simple("ne", -1, res, ARRAY_SIZE(res)); |
254 | platform_device_register_simple("ne", -1, | ||
255 | res, ARRAY_SIZE(res)); | ||
256 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | ||
257 | } | 236 | } |
258 | 237 | ||
259 | static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock); | 238 | static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock); |