aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx25/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx25/devices.c')
-rw-r--r--arch/arm/mach-mx25/devices.c313
1 files changed, 81 insertions, 232 deletions
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
index 3a405fa400eb..3468eb15b236 100644
--- a/arch/arm/mach-mx25/devices.c
+++ b/arch/arm/mach-mx25/devices.c
@@ -22,103 +22,6 @@
22#include <mach/mx25.h> 22#include <mach/mx25.h>
23#include <mach/irqs.h> 23#include <mach/irqs.h>
24 24
25static struct resource uart0[] = {
26 {
27 .start = 0x43f90000,
28 .end = 0x43f93fff,
29 .flags = IORESOURCE_MEM,
30 }, {
31 .start = 45,
32 .end = 45,
33 .flags = IORESOURCE_IRQ,
34 },
35};
36
37struct platform_device mxc_uart_device0 = {
38 .name = "imx-uart",
39 .id = 0,
40 .resource = uart0,
41 .num_resources = ARRAY_SIZE(uart0),
42};
43
44static struct resource uart1[] = {
45 {
46 .start = 0x43f94000,
47 .end = 0x43f97fff,
48 .flags = IORESOURCE_MEM,
49 }, {
50 .start = 32,
51 .end = 32,
52 .flags = IORESOURCE_IRQ,
53 },
54};
55
56struct platform_device mxc_uart_device1 = {
57 .name = "imx-uart",
58 .id = 1,
59 .resource = uart1,
60 .num_resources = ARRAY_SIZE(uart1),
61};
62
63static struct resource uart2[] = {
64 {
65 .start = 0x5000c000,
66 .end = 0x5000ffff,
67 .flags = IORESOURCE_MEM,
68 }, {
69 .start = 18,
70 .end = 18,
71 .flags = IORESOURCE_IRQ,
72 },
73};
74
75struct platform_device mxc_uart_device2 = {
76 .name = "imx-uart",
77 .id = 2,
78 .resource = uart2,
79 .num_resources = ARRAY_SIZE(uart2),
80};
81
82static struct resource uart3[] = {
83 {
84 .start = 0x50008000,
85 .end = 0x5000bfff,
86 .flags = IORESOURCE_MEM,
87 }, {
88 .start = 5,
89 .end = 5,
90 .flags = IORESOURCE_IRQ,
91 },
92};
93
94struct platform_device mxc_uart_device3 = {
95 .name = "imx-uart",
96 .id = 3,
97 .resource = uart3,
98 .num_resources = ARRAY_SIZE(uart3),
99};
100
101static struct resource uart4[] = {
102 {
103 .start = 0x5002c000,
104 .end = 0x5002ffff,
105 .flags = IORESOURCE_MEM,
106 }, {
107 .start = 40,
108 .end = 40,
109 .flags = IORESOURCE_IRQ,
110 },
111};
112
113struct platform_device mxc_uart_device4 = {
114 .name = "imx-uart",
115 .id = 4,
116 .resource = uart4,
117 .num_resources = ARRAY_SIZE(uart4),
118};
119
120#define MX25_OTG_BASE_ADDR 0x53FF4000
121
122static u64 otg_dmamask = DMA_BIT_MASK(32); 25static u64 otg_dmamask = DMA_BIT_MASK(32);
123 26
124static struct resource mxc_otg_resources[] = { 27static struct resource mxc_otg_resources[] = {
@@ -181,63 +84,6 @@ struct platform_device mxc_usbh2 = {
181 .num_resources = ARRAY_SIZE(mxc_usbh2_resources), 84 .num_resources = ARRAY_SIZE(mxc_usbh2_resources),
182}; 85};
183 86
184static struct resource mxc_spi_resources0[] = {
185 {
186 .start = 0x43fa4000,
187 .end = 0x43fa7fff,
188 .flags = IORESOURCE_MEM,
189 }, {
190 .start = 14,
191 .end = 14,
192 .flags = IORESOURCE_IRQ,
193 },
194};
195
196struct platform_device mxc_spi_device0 = {
197 .name = "spi_imx",
198 .id = 0,
199 .num_resources = ARRAY_SIZE(mxc_spi_resources0),
200 .resource = mxc_spi_resources0,
201};
202
203static struct resource mxc_spi_resources1[] = {
204 {
205 .start = 0x50010000,
206 .end = 0x50013fff,
207 .flags = IORESOURCE_MEM,
208 }, {
209 .start = 13,
210 .end = 13,
211 .flags = IORESOURCE_IRQ,
212 },
213};
214
215struct platform_device mxc_spi_device1 = {
216 .name = "spi_imx",
217 .id = 1,
218 .num_resources = ARRAY_SIZE(mxc_spi_resources1),
219 .resource = mxc_spi_resources1,
220};
221
222static struct resource mxc_spi_resources2[] = {
223 {
224 .start = 0x50004000,
225 .end = 0x50007fff,
226 .flags = IORESOURCE_MEM,
227 }, {
228 .start = 0,
229 .end = 0,
230 .flags = IORESOURCE_IRQ,
231 },
232};
233
234struct platform_device mxc_spi_device2 = {
235 .name = "spi_imx",
236 .id = 2,
237 .num_resources = ARRAY_SIZE(mxc_spi_resources2),
238 .resource = mxc_spi_resources2,
239};
240
241static struct resource mxc_pwm_resources0[] = { 87static struct resource mxc_pwm_resources0[] = {
242 { 88 {
243 .start = 0x53fe0000, 89 .start = 0x53fe0000,
@@ -333,63 +179,6 @@ struct platform_device mxc_pwm_device3 = {
333 .resource = mxc_pwm_resources3, 179 .resource = mxc_pwm_resources3,
334}; 180};
335 181
336static struct resource mxc_i2c_1_resources[] = {
337 {
338 .start = 0x43f80000,
339 .end = 0x43f83fff,
340 .flags = IORESOURCE_MEM,
341 }, {
342 .start = 3,
343 .end = 3,
344 .flags = IORESOURCE_IRQ,
345 }
346};
347
348struct platform_device mxc_i2c_device0 = {
349 .name = "imx-i2c",
350 .id = 0,
351 .num_resources = ARRAY_SIZE(mxc_i2c_1_resources),
352 .resource = mxc_i2c_1_resources,
353};
354
355static struct resource mxc_i2c_2_resources[] = {
356 {
357 .start = 0x43f98000,
358 .end = 0x43f9bfff,
359 .flags = IORESOURCE_MEM,
360 }, {
361 .start = 4,
362 .end = 4,
363 .flags = IORESOURCE_IRQ,
364 }
365};
366
367struct platform_device mxc_i2c_device1 = {
368 .name = "imx-i2c",
369 .id = 1,
370 .num_resources = ARRAY_SIZE(mxc_i2c_2_resources),
371 .resource = mxc_i2c_2_resources,
372};
373
374static struct resource mxc_i2c_3_resources[] = {
375 {
376 .start = 0x43f84000,
377 .end = 0x43f87fff,
378 .flags = IORESOURCE_MEM,
379 }, {
380 .start = 10,
381 .end = 10,
382 .flags = IORESOURCE_IRQ,
383 }
384};
385
386struct platform_device mxc_i2c_device2 = {
387 .name = "imx-i2c",
388 .id = 2,
389 .num_resources = ARRAY_SIZE(mxc_i2c_3_resources),
390 .resource = mxc_i2c_3_resources,
391};
392
393static struct mxc_gpio_port imx_gpio_ports[] = { 182static struct mxc_gpio_port imx_gpio_ports[] = {
394 { 183 {
395 .chip.label = "gpio-0", 184 .chip.label = "gpio-0",
@@ -414,7 +203,7 @@ static struct mxc_gpio_port imx_gpio_ports[] = {
414 } 203 }
415}; 204};
416 205
417int __init mxc_register_gpios(void) 206int __init imx25_register_gpios(void)
418{ 207{
419 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); 208 return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports));
420} 209}
@@ -439,26 +228,6 @@ struct platform_device mx25_fec_device = {
439 .resource = mx25_fec_resources, 228 .resource = mx25_fec_resources,
440}; 229};
441 230
442static struct resource mxc_nand_resources[] = {
443 {
444 .start = MX25_NFC_BASE_ADDR,
445 .end = MX25_NFC_BASE_ADDR + 0x1fff,
446 .flags = IORESOURCE_MEM,
447 },
448 {
449 .start = MX25_INT_NANDFC,
450 .end = MX25_INT_NANDFC,
451 .flags = IORESOURCE_IRQ,
452 },
453};
454
455struct platform_device mxc_nand_device = {
456 .name = "mxc_nand",
457 .id = 0,
458 .num_resources = ARRAY_SIZE(mxc_nand_resources),
459 .resource = mxc_nand_resources,
460};
461
462static struct resource mx25_rtc_resources[] = { 231static struct resource mx25_rtc_resources[] = {
463 { 232 {
464 .start = MX25_DRYICE_BASE_ADDR, 233 .start = MX25_DRYICE_BASE_ADDR,
@@ -515,3 +284,83 @@ struct platform_device mxc_wdt = {
515 .num_resources = ARRAY_SIZE(mxc_wdt_resources), 284 .num_resources = ARRAY_SIZE(mxc_wdt_resources),
516 .resource = mxc_wdt_resources, 285 .resource = mxc_wdt_resources,
517}; 286};
287
288static struct resource mx25_kpp_resources[] = {
289 {
290 .start = MX25_KPP_BASE_ADDR,
291 .end = MX25_KPP_BASE_ADDR + 0xf,
292 .flags = IORESOURCE_MEM,
293 },
294 {
295 .start = MX25_INT_KPP,
296 .end = MX25_INT_KPP,
297 .flags = IORESOURCE_IRQ,
298 },
299};
300
301struct platform_device mx25_kpp_device = {
302 .name = "imx-keypad",
303 .id = -1,
304 .num_resources = ARRAY_SIZE(mx25_kpp_resources),
305 .resource = mx25_kpp_resources,
306};
307
308static struct resource imx_ssi_resources0[] = {
309 {
310 .start = MX25_SSI1_BASE_ADDR,
311 .end = MX25_SSI1_BASE_ADDR + 0x3fff,
312 .flags = IORESOURCE_MEM,
313 }, {
314 .start = MX25_INT_SSI1,
315 .end = MX25_INT_SSI1,
316 .flags = IORESOURCE_IRQ,
317 },
318};
319
320static struct resource imx_ssi_resources1[] = {
321 {
322 .start = MX25_SSI2_BASE_ADDR,
323 .end = MX25_SSI2_BASE_ADDR + 0x3fff,
324 .flags = IORESOURCE_MEM
325 }, {
326 .start = MX25_INT_SSI2,
327 .end = MX25_INT_SSI2,
328 .flags = IORESOURCE_IRQ,
329 },
330};
331
332struct platform_device imx_ssi_device0 = {
333 .name = "imx-ssi",
334 .id = 0,
335 .num_resources = ARRAY_SIZE(imx_ssi_resources0),
336 .resource = imx_ssi_resources0,
337};
338
339struct platform_device imx_ssi_device1 = {
340 .name = "imx-ssi",
341 .id = 1,
342 .num_resources = ARRAY_SIZE(imx_ssi_resources1),
343 .resource = imx_ssi_resources1,
344};
345
346static struct resource mx25_csi_resources[] = {
347 {
348 .start = MX25_CSI_BASE_ADDR,
349 .end = MX25_CSI_BASE_ADDR + 0xfff,
350 .flags = IORESOURCE_MEM,
351 },
352 {
353 .start = MX25_INT_CSI,
354 .flags = IORESOURCE_IRQ
355 },
356};
357
358struct platform_device mx25_csi_device = {
359 .name = "mx2-camera",
360 .id = 0,
361 .num_resources = ARRAY_SIZE(mx25_csi_resources),
362 .resource = mx25_csi_resources,
363 .dev = {
364 .coherent_dma_mask = 0xffffffff,
365 },
366};