diff options
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/migor/setup.c | 11 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7780mp.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7780rp.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/irq-r7785rp.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/setup.c | 24 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 7 |
6 files changed, 18 insertions, 30 deletions
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c index e7c150d4970..01af44245b5 100644 --- a/arch/sh/boards/renesas/migor/setup.c +++ b/arch/sh/boards/renesas/migor/setup.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/mtd/physmap.h> | 14 | #include <linux/mtd/physmap.h> |
15 | #include <linux/mtd/nand.h> | 15 | #include <linux/mtd/nand.h> |
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/smc91x.h> | ||
17 | #include <asm/machvec.h> | 18 | #include <asm/machvec.h> |
18 | #include <asm/io.h> | 19 | #include <asm/io.h> |
19 | #include <asm/sh_keysc.h> | 20 | #include <asm/sh_keysc.h> |
@@ -27,6 +28,11 @@ | |||
27 | * 0x18000000 8GB 8 NAND Flash (K9K8G08U0A) | 28 | * 0x18000000 8GB 8 NAND Flash (K9K8G08U0A) |
28 | */ | 29 | */ |
29 | 30 | ||
31 | static struct smc91x_platdata smc91x_info = { | ||
32 | .flags = SMC91X_USE_16BIT, | ||
33 | .irq_flags = IRQF_TRIGGER_HIGH, | ||
34 | }; | ||
35 | |||
30 | static struct resource smc91x_eth_resources[] = { | 36 | static struct resource smc91x_eth_resources[] = { |
31 | [0] = { | 37 | [0] = { |
32 | .name = "SMC91C111" , | 38 | .name = "SMC91C111" , |
@@ -36,7 +42,7 @@ static struct resource smc91x_eth_resources[] = { | |||
36 | }, | 42 | }, |
37 | [1] = { | 43 | [1] = { |
38 | .start = 32, /* IRQ0 */ | 44 | .start = 32, /* IRQ0 */ |
39 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | 45 | .flags = IORESOURCE_IRQ, |
40 | }, | 46 | }, |
41 | }; | 47 | }; |
42 | 48 | ||
@@ -44,6 +50,9 @@ static struct platform_device smc91x_eth_device = { | |||
44 | .name = "smc91x", | 50 | .name = "smc91x", |
45 | .num_resources = ARRAY_SIZE(smc91x_eth_resources), | 51 | .num_resources = ARRAY_SIZE(smc91x_eth_resources), |
46 | .resource = smc91x_eth_resources, | 52 | .resource = smc91x_eth_resources, |
53 | .dev = { | ||
54 | .platform_data = &smc91x_info, | ||
55 | }, | ||
47 | }; | 56 | }; |
48 | 57 | ||
49 | static struct sh_keysc_info sh_keysc_info = { | 58 | static struct sh_keysc_info sh_keysc_info = { |
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c index 68f0ad1b637..ae1cfcb2970 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7780mp.c | |||
@@ -62,7 +62,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = { | |||
62 | static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors, | 62 | static DECLARE_INTC_DESC(intc_desc, "r7780mp", vectors, |
63 | NULL, mask_registers, NULL, NULL); | 63 | NULL, mask_registers, NULL, NULL); |
64 | 64 | ||
65 | unsigned char * __init highlander_init_irq_r7780mp(void) | 65 | unsigned char * __init highlander_plat_irq_setup(void) |
66 | { | 66 | { |
67 | if ((ctrl_inw(0xa4000700) & 0xf000) == 0x2000) { | 67 | if ((ctrl_inw(0xa4000700) & 0xf000) == 0x2000) { |
68 | printk(KERN_INFO "Using r7780mp interrupt controller.\n"); | 68 | printk(KERN_INFO "Using r7780mp interrupt controller.\n"); |
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c index bd34048ed0e..9d3921fe27c 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7780rp.c | |||
@@ -55,7 +55,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = { | |||
55 | static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors, | 55 | static DECLARE_INTC_DESC(intc_desc, "r7780rp", vectors, |
56 | NULL, mask_registers, NULL, NULL); | 56 | NULL, mask_registers, NULL, NULL); |
57 | 57 | ||
58 | unsigned char * __init highlander_init_irq_r7780rp(void) | 58 | unsigned char * __init highlander_plat_irq_setup(void) |
59 | { | 59 | { |
60 | if (ctrl_inw(0xa5000600)) { | 60 | if (ctrl_inw(0xa5000600)) { |
61 | printk(KERN_INFO "Using r7780rp interrupt controller.\n"); | 61 | printk(KERN_INFO "Using r7780rp interrupt controller.\n"); |
diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c index bf7ec107fbc..896c045aa39 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c | |||
@@ -64,7 +64,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initdata = { | |||
64 | static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors, | 64 | static DECLARE_INTC_DESC(intc_desc, "r7785rp", vectors, |
65 | NULL, mask_registers, NULL, NULL); | 65 | NULL, mask_registers, NULL, NULL); |
66 | 66 | ||
67 | unsigned char * __init highlander_init_irq_r7785rp(void) | 67 | unsigned char * __init highlander_plat_irq_setup(void) |
68 | { | 68 | { |
69 | if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000) | 69 | if ((ctrl_inw(0xa4000158) & 0xf000) != 0x1000) |
70 | return NULL; | 70 | return NULL; |
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index ac0a96522e4..bc79afb6fc4 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -316,7 +316,7 @@ static void __init highlander_setup(char **cmdline_p) | |||
316 | 316 | ||
317 | static unsigned char irl2irq[HL_NR_IRL]; | 317 | static unsigned char irl2irq[HL_NR_IRL]; |
318 | 318 | ||
319 | int highlander_irq_demux(int irq) | 319 | static int highlander_irq_demux(int irq) |
320 | { | 320 | { |
321 | if (irq >= HL_NR_IRL || !irl2irq[irq]) | 321 | if (irq >= HL_NR_IRL || !irl2irq[irq]) |
322 | return irq; | 322 | return irq; |
@@ -324,27 +324,9 @@ int highlander_irq_demux(int irq) | |||
324 | return irl2irq[irq]; | 324 | return irl2irq[irq]; |
325 | } | 325 | } |
326 | 326 | ||
327 | void __init highlander_init_irq(void) | 327 | static void __init highlander_init_irq(void) |
328 | { | 328 | { |
329 | unsigned char *ucp = NULL; | 329 | unsigned char *ucp = highlander_plat_irq_setup(); |
330 | |||
331 | do { | ||
332 | #ifdef CONFIG_SH_R7780MP | ||
333 | ucp = highlander_init_irq_r7780mp(); | ||
334 | if (ucp) | ||
335 | break; | ||
336 | #endif | ||
337 | #ifdef CONFIG_SH_R7785RP | ||
338 | ucp = highlander_init_irq_r7785rp(); | ||
339 | if (ucp) | ||
340 | break; | ||
341 | #endif | ||
342 | #ifdef CONFIG_SH_R7780RP | ||
343 | ucp = highlander_init_irq_r7780rp(); | ||
344 | if (ucp) | ||
345 | break; | ||
346 | #endif | ||
347 | } while (0); | ||
348 | 330 | ||
349 | if (ucp) { | 331 | if (ucp) { |
350 | plat_irq_setup_pins(IRQ_MODE_IRL3210); | 332 | plat_irq_setup_pins(IRQ_MODE_IRL3210); |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index f21ee49ef3a..452d0d6459a 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -109,7 +109,6 @@ static struct platform_device heartbeat_device = { | |||
109 | .resource = heartbeat_resources, | 109 | .resource = heartbeat_resources, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | #ifdef CONFIG_MFD_SM501 | ||
113 | static struct plat_serial8250_port uart_platform_data[] = { | 112 | static struct plat_serial8250_port uart_platform_data[] = { |
114 | { | 113 | { |
115 | .membase = (void __iomem *)0xb3e30000, | 114 | .membase = (void __iomem *)0xb3e30000, |
@@ -208,13 +207,9 @@ static struct platform_device sm501_device = { | |||
208 | .resource = sm501_resources, | 207 | .resource = sm501_resources, |
209 | }; | 208 | }; |
210 | 209 | ||
211 | #endif /* CONFIG_MFD_SM501 */ | ||
212 | |||
213 | static struct platform_device *rts7751r2d_devices[] __initdata = { | 210 | static struct platform_device *rts7751r2d_devices[] __initdata = { |
214 | #ifdef CONFIG_MFD_SM501 | ||
215 | &uart_device, | 211 | &uart_device, |
216 | &sm501_device, | 212 | &sm501_device, |
217 | #endif | ||
218 | &heartbeat_device, | 213 | &heartbeat_device, |
219 | &spi_sh_sci_device, | 214 | &spi_sh_sci_device, |
220 | }; | 215 | }; |
@@ -234,7 +229,9 @@ static int __init rts7751r2d_devices_setup(void) | |||
234 | { | 229 | { |
235 | if (register_trapped_io(&cf_trapped_io) == 0) | 230 | if (register_trapped_io(&cf_trapped_io) == 0) |
236 | platform_device_register(&cf_ide_device); | 231 | platform_device_register(&cf_ide_device); |
232 | |||
237 | spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); | 233 | spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); |
234 | |||
238 | return platform_add_devices(rts7751r2d_devices, | 235 | return platform_add_devices(rts7751r2d_devices, |
239 | ARRAY_SIZE(rts7751r2d_devices)); | 236 | ARRAY_SIZE(rts7751r2d_devices)); |
240 | } | 237 | } |