diff options
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/x3proto/setup.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/x3proto/setup.c b/arch/sh/boards/renesas/x3proto/setup.c index 5dfa0f31cd2d..0e26d3e7e4e1 100644 --- a/arch/sh/boards/renesas/x3proto/setup.c +++ b/arch/sh/boards/renesas/x3proto/setup.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <asm/ilsel.h> | ||
16 | 17 | ||
17 | static struct resource heartbeat_resources[] = { | 18 | static struct resource heartbeat_resources[] = { |
18 | [0] = { | 19 | [0] = { |
@@ -29,12 +30,93 @@ static struct platform_device heartbeat_device = { | |||
29 | .resource = heartbeat_resources, | 30 | .resource = heartbeat_resources, |
30 | }; | 31 | }; |
31 | 32 | ||
33 | static struct resource smc91x_resources[] = { | ||
34 | [0] = { | ||
35 | .start = 0x18000300, | ||
36 | .end = 0x18000300 + 0x10 - 1, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | [1] = { | ||
40 | /* Filled in by ilsel */ | ||
41 | .flags = IORESOURCE_IRQ, | ||
42 | }, | ||
43 | }; | ||
44 | |||
45 | static struct platform_device smc91x_device = { | ||
46 | .name = "smc91x", | ||
47 | .id = -1, | ||
48 | .resource = smc91x_resources, | ||
49 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
50 | }; | ||
51 | |||
52 | static struct resource r8a66597_usb_host_resources[] = { | ||
53 | [0] = { | ||
54 | .name = "r8a66597_hcd", | ||
55 | .start = 0x18040000, | ||
56 | .end = 0x18080000 - 1, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | [1] = { | ||
60 | .name = "r8a66597_hcd", | ||
61 | /* Filled in by ilsel */ | ||
62 | .flags = IORESOURCE_IRQ, | ||
63 | }, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device r8a66597_usb_host_device = { | ||
67 | .name = "r8a66597_hcd", | ||
68 | .id = -1, | ||
69 | .dev = { | ||
70 | .dma_mask = NULL, /* don't use dma */ | ||
71 | .coherent_dma_mask = 0xffffffff, | ||
72 | }, | ||
73 | .num_resources = ARRAY_SIZE(r8a66597_usb_host_resources), | ||
74 | .resource = r8a66597_usb_host_resources, | ||
75 | }; | ||
76 | |||
77 | static struct resource m66592_usb_peripheral_resources[] = { | ||
78 | [0] = { | ||
79 | .name = "m66592_udc", | ||
80 | .start = 0x18080000, | ||
81 | .end = 0x180c0000 - 1, | ||
82 | .flags = IORESOURCE_MEM, | ||
83 | }, | ||
84 | [1] = { | ||
85 | .name = "m66592_udc", | ||
86 | /* Filled in by ilsel */ | ||
87 | .flags = IORESOURCE_IRQ, | ||
88 | }, | ||
89 | }; | ||
90 | |||
91 | static struct platform_device m66592_usb_peripheral_device = { | ||
92 | .name = "m66592_udc", | ||
93 | .id = -1, | ||
94 | .dev = { | ||
95 | .dma_mask = NULL, /* don't use dma */ | ||
96 | .coherent_dma_mask = 0xffffffff, | ||
97 | }, | ||
98 | .num_resources = ARRAY_SIZE(m66592_usb_peripheral_resources), | ||
99 | .resource = m66592_usb_peripheral_resources, | ||
100 | }; | ||
101 | |||
32 | static struct platform_device *x3proto_devices[] __initdata = { | 102 | static struct platform_device *x3proto_devices[] __initdata = { |
33 | &heartbeat_device, | 103 | &heartbeat_device, |
104 | &smc91x_device, | ||
105 | &r8a66597_usb_host_device, | ||
106 | &m66592_usb_peripheral_device, | ||
34 | }; | 107 | }; |
35 | 108 | ||
36 | static int __init x3proto_devices_setup(void) | 109 | static int __init x3proto_devices_setup(void) |
37 | { | 110 | { |
111 | r8a66597_usb_host_resources[1].start = | ||
112 | r8a66597_usb_host_resources[1].end = ilsel_enable(ILSEL_USBH_I); | ||
113 | |||
114 | m66592_usb_peripheral_resources[1].start = | ||
115 | m66592_usb_peripheral_resources[1].end = ilsel_enable(ILSEL_USBP_I); | ||
116 | |||
117 | smc91x_resources[1].start = | ||
118 | smc91x_resources[1].end = ilsel_enable(ILSEL_LAN); | ||
119 | |||
38 | return platform_add_devices(x3proto_devices, | 120 | return platform_add_devices(x3proto_devices, |
39 | ARRAY_SIZE(x3proto_devices)); | 121 | ARRAY_SIZE(x3proto_devices)); |
40 | } | 122 | } |