aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900/mach-w90p910evb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-w90x900/mach-w90p910evb.c')
-rw-r--r--arch/arm/mach-w90x900/mach-w90p910evb.c164
1 files changed, 159 insertions, 5 deletions
diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c
index 726ff6798a56..7a62bd348e80 100644
--- a/arch/arm/mach-w90x900/mach-w90p910evb.c
+++ b/arch/arm/mach-w90x900/mach-w90p910evb.c
@@ -3,15 +3,13 @@
3 * 3 *
4 * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche 4 * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche
5 * 5 *
6 * Copyright (C) 2008 Nuvoton technology corporation 6 * Copyright (C) 2008 Nuvoton technology corporation.
7 * All rights reserved.
8 * 7 *
9 * Wan ZongShun <mcuos.com@gmail.com> 8 * Wan ZongShun <mcuos.com@gmail.com>
10 * 9 *
11 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as 11 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of 12 * published by the Free Software Foundation;version 2 of the License.
14 * the License, or (at your option) any later version.
15 * 13 *
16 */ 14 */
17 15
@@ -80,6 +78,156 @@ static struct platform_device w90p910_flash_device = {
80 .num_resources = ARRAY_SIZE(w90p910_flash_resources), 78 .num_resources = ARRAY_SIZE(w90p910_flash_resources),
81}; 79};
82 80
81/* USB EHCI Host Controller */
82
83static struct resource w90x900_usb_ehci_resource[] = {
84 [0] = {
85 .start = W90X900_PA_USBEHCIHOST,
86 .end = W90X900_PA_USBEHCIHOST + W90X900_SZ_USBEHCIHOST - 1,
87 .flags = IORESOURCE_MEM,
88 },
89 [1] = {
90 .start = IRQ_USBH,
91 .end = IRQ_USBH,
92 .flags = IORESOURCE_IRQ,
93 }
94};
95
96static u64 w90x900_device_usb_ehci_dmamask = 0xffffffffUL;
97
98struct platform_device w90x900_device_usb_ehci = {
99 .name = "w90x900-ehci",
100 .id = -1,
101 .num_resources = ARRAY_SIZE(w90x900_usb_ehci_resource),
102 .resource = w90x900_usb_ehci_resource,
103 .dev = {
104 .dma_mask = &w90x900_device_usb_ehci_dmamask,
105 .coherent_dma_mask = 0xffffffffUL
106 }
107};
108EXPORT_SYMBOL(w90x900_device_usb_ehci);
109
110/* USB OHCI Host Controller */
111
112static struct resource w90x900_usb_ohci_resource[] = {
113 [0] = {
114 .start = W90X900_PA_USBOHCIHOST,
115 .end = W90X900_PA_USBOHCIHOST + W90X900_SZ_USBOHCIHOST - 1,
116 .flags = IORESOURCE_MEM,
117 },
118 [1] = {
119 .start = IRQ_USBH,
120 .end = IRQ_USBH,
121 .flags = IORESOURCE_IRQ,
122 }
123};
124
125static u64 w90x900_device_usb_ohci_dmamask = 0xffffffffUL;
126struct platform_device w90x900_device_usb_ohci = {
127 .name = "w90x900-ohci",
128 .id = -1,
129 .num_resources = ARRAY_SIZE(w90x900_usb_ohci_resource),
130 .resource = w90x900_usb_ohci_resource,
131 .dev = {
132 .dma_mask = &w90x900_device_usb_ohci_dmamask,
133 .coherent_dma_mask = 0xffffffffUL
134 }
135};
136EXPORT_SYMBOL(w90x900_device_usb_ohci);
137
138/*TouchScreen controller*/
139
140static struct resource w90x900_ts_resource[] = {
141 [0] = {
142 .start = W90X900_PA_ADC,
143 .end = W90X900_PA_ADC + W90X900_SZ_ADC-1,
144 .flags = IORESOURCE_MEM,
145 },
146 [1] = {
147 .start = IRQ_ADC,
148 .end = IRQ_ADC,
149 .flags = IORESOURCE_IRQ,
150 },
151};
152
153struct platform_device w90x900_device_ts = {
154 .name = "w90x900-ts",
155 .id = -1,
156 .resource = w90x900_ts_resource,
157 .num_resources = ARRAY_SIZE(w90x900_ts_resource),
158};
159EXPORT_SYMBOL(w90x900_device_ts);
160
161/* RTC controller*/
162
163static struct resource w90x900_rtc_resource[] = {
164 [0] = {
165 .start = W90X900_PA_RTC,
166 .end = W90X900_PA_RTC + 0xff,
167 .flags = IORESOURCE_MEM,
168 },
169 [1] = {
170 .start = IRQ_RTC,
171 .end = IRQ_RTC,
172 .flags = IORESOURCE_IRQ,
173 },
174};
175
176struct platform_device w90x900_device_rtc = {
177 .name = "w90x900-rtc",
178 .id = -1,
179 .num_resources = ARRAY_SIZE(w90x900_rtc_resource),
180 .resource = w90x900_rtc_resource,
181};
182EXPORT_SYMBOL(w90x900_device_rtc);
183
184/* KPI controller*/
185
186static struct resource w90x900_kpi_resource[] = {
187 [0] = {
188 .start = W90X900_PA_KPI,
189 .end = W90X900_PA_KPI + W90X900_SZ_KPI - 1,
190 .flags = IORESOURCE_MEM,
191 },
192 [1] = {
193 .start = IRQ_KPI,
194 .end = IRQ_KPI,
195 .flags = IORESOURCE_IRQ,
196 }
197
198};
199
200struct platform_device w90x900_device_kpi = {
201 .name = "w90x900-kpi",
202 .id = -1,
203 .num_resources = ARRAY_SIZE(w90x900_kpi_resource),
204 .resource = w90x900_kpi_resource,
205};
206EXPORT_SYMBOL(w90x900_device_kpi);
207
208/* USB Device (Gadget)*/
209
210static struct resource w90x900_usbgadget_resource[] = {
211 [0] = {
212 .start = W90X900_PA_USBDEV,
213 .end = W90X900_PA_USBDEV + W90X900_SZ_USBDEV - 1,
214 .flags = IORESOURCE_MEM,
215 },
216 [1] = {
217 .start = IRQ_USBD,
218 .end = IRQ_USBD,
219 .flags = IORESOURCE_IRQ,
220 }
221};
222
223struct platform_device w90x900_device_usbgadget = {
224 .name = "w90x900-usbgadget",
225 .id = -1,
226 .num_resources = ARRAY_SIZE(w90x900_usbgadget_resource),
227 .resource = w90x900_usbgadget_resource,
228};
229EXPORT_SYMBOL(w90x900_device_usbgadget);
230
83static struct map_desc w90p910_iodesc[] __initdata = { 231static struct map_desc w90p910_iodesc[] __initdata = {
84}; 232};
85 233
@@ -88,12 +236,18 @@ static struct map_desc w90p910_iodesc[] __initdata = {
88static struct platform_device *w90p910evb_dev[] __initdata = { 236static struct platform_device *w90p910evb_dev[] __initdata = {
89 &w90p910_serial_device, 237 &w90p910_serial_device,
90 &w90p910_flash_device, 238 &w90p910_flash_device,
239 &w90x900_device_usb_ehci,
240 &w90x900_device_usb_ohci,
241 &w90x900_device_ts,
242 &w90x900_device_rtc,
243 &w90x900_device_kpi,
244 &w90x900_device_usbgadget,
91}; 245};
92 246
93static void __init w90p910evb_map_io(void) 247static void __init w90p910evb_map_io(void)
94{ 248{
95 w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc)); 249 w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc));
96 w90p910_init_clocks(0); 250 w90p910_init_clocks();
97} 251}
98 252
99static void __init w90p910evb_init(void) 253static void __init w90p910evb_init(void)