diff options
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 116 |
1 files changed, 114 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index d6c05b6eab35..a6f2390ce662 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -10,11 +10,14 @@ | |||
10 | #include <asm/arch/mmc.h> | 10 | #include <asm/arch/mmc.h> |
11 | #include <asm/arch/irda.h> | 11 | #include <asm/arch/irda.h> |
12 | #include <asm/arch/i2c.h> | 12 | #include <asm/arch/i2c.h> |
13 | #include <asm/arch/mfp-pxa27x.h> | ||
13 | #include <asm/arch/ohci.h> | 14 | #include <asm/arch/ohci.h> |
14 | #include <asm/arch/pxa27x_keypad.h> | 15 | #include <asm/arch/pxa27x_keypad.h> |
15 | #include <asm/arch/camera.h> | 16 | #include <asm/arch/camera.h> |
17 | #include <asm/arch/audio.h> | ||
16 | 18 | ||
17 | #include "devices.h" | 19 | #include "devices.h" |
20 | #include "generic.h" | ||
18 | 21 | ||
19 | void __init pxa_register_device(struct platform_device *dev, void *data) | 22 | void __init pxa_register_device(struct platform_device *dev, void *data) |
20 | { | 23 | { |
@@ -91,8 +94,19 @@ static struct resource pxa2xx_udc_resources[] = { | |||
91 | 94 | ||
92 | static u64 udc_dma_mask = ~(u32)0; | 95 | static u64 udc_dma_mask = ~(u32)0; |
93 | 96 | ||
94 | struct platform_device pxa_device_udc = { | 97 | struct platform_device pxa25x_device_udc = { |
95 | .name = "pxa2xx-udc", | 98 | .name = "pxa25x-udc", |
99 | .id = -1, | ||
100 | .resource = pxa2xx_udc_resources, | ||
101 | .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), | ||
102 | .dev = { | ||
103 | .platform_data = &pxa_udc_info, | ||
104 | .dma_mask = &udc_dma_mask, | ||
105 | } | ||
106 | }; | ||
107 | |||
108 | struct platform_device pxa27x_device_udc = { | ||
109 | .name = "pxa27x-udc", | ||
96 | .id = -1, | 110 | .id = -1, |
97 | .resource = pxa2xx_udc_resources, | 111 | .resource = pxa2xx_udc_resources, |
98 | .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), | 112 | .num_resources = ARRAY_SIZE(pxa2xx_udc_resources), |
@@ -233,8 +247,15 @@ struct platform_device pxa_device_i2c = { | |||
233 | .num_resources = ARRAY_SIZE(pxai2c_resources), | 247 | .num_resources = ARRAY_SIZE(pxai2c_resources), |
234 | }; | 248 | }; |
235 | 249 | ||
250 | static unsigned long pxa27x_i2c_mfp_cfg[] = { | ||
251 | GPIO117_I2C_SCL, | ||
252 | GPIO118_I2C_SDA, | ||
253 | }; | ||
254 | |||
236 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | 255 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) |
237 | { | 256 | { |
257 | if (cpu_is_pxa27x()) | ||
258 | pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg)); | ||
238 | pxa_register_device(&pxa_device_i2c, info); | 259 | pxa_register_device(&pxa_device_i2c, info); |
239 | } | 260 | } |
240 | 261 | ||
@@ -278,8 +299,69 @@ struct platform_device pxa_device_rtc = { | |||
278 | .id = -1, | 299 | .id = -1, |
279 | }; | 300 | }; |
280 | 301 | ||
302 | static struct resource pxa_ac97_resources[] = { | ||
303 | [0] = { | ||
304 | .start = 0x40500000, | ||
305 | .end = 0x40500000 + 0xfff, | ||
306 | .flags = IORESOURCE_MEM, | ||
307 | }, | ||
308 | [1] = { | ||
309 | .start = IRQ_AC97, | ||
310 | .end = IRQ_AC97, | ||
311 | .flags = IORESOURCE_IRQ, | ||
312 | }, | ||
313 | }; | ||
314 | |||
315 | static u64 pxa_ac97_dmamask = 0xffffffffUL; | ||
316 | |||
317 | struct platform_device pxa_device_ac97 = { | ||
318 | .name = "pxa2xx-ac97", | ||
319 | .id = -1, | ||
320 | .dev = { | ||
321 | .dma_mask = &pxa_ac97_dmamask, | ||
322 | .coherent_dma_mask = 0xffffffff, | ||
323 | }, | ||
324 | .num_resources = ARRAY_SIZE(pxa_ac97_resources), | ||
325 | .resource = pxa_ac97_resources, | ||
326 | }; | ||
327 | |||
328 | void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops) | ||
329 | { | ||
330 | pxa_register_device(&pxa_device_ac97, ops); | ||
331 | } | ||
332 | |||
281 | #ifdef CONFIG_PXA25x | 333 | #ifdef CONFIG_PXA25x |
282 | 334 | ||
335 | static struct resource pxa25x_resource_pwm0[] = { | ||
336 | [0] = { | ||
337 | .start = 0x40b00000, | ||
338 | .end = 0x40b0000f, | ||
339 | .flags = IORESOURCE_MEM, | ||
340 | }, | ||
341 | }; | ||
342 | |||
343 | struct platform_device pxa25x_device_pwm0 = { | ||
344 | .name = "pxa25x-pwm", | ||
345 | .id = 0, | ||
346 | .resource = pxa25x_resource_pwm0, | ||
347 | .num_resources = ARRAY_SIZE(pxa25x_resource_pwm0), | ||
348 | }; | ||
349 | |||
350 | static struct resource pxa25x_resource_pwm1[] = { | ||
351 | [0] = { | ||
352 | .start = 0x40c00000, | ||
353 | .end = 0x40c0000f, | ||
354 | .flags = IORESOURCE_MEM, | ||
355 | }, | ||
356 | }; | ||
357 | |||
358 | struct platform_device pxa25x_device_pwm1 = { | ||
359 | .name = "pxa25x-pwm", | ||
360 | .id = 1, | ||
361 | .resource = pxa25x_resource_pwm1, | ||
362 | .num_resources = ARRAY_SIZE(pxa25x_resource_pwm1), | ||
363 | }; | ||
364 | |||
283 | static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32); | 365 | static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32); |
284 | 366 | ||
285 | static struct resource pxa25x_resource_ssp[] = { | 367 | static struct resource pxa25x_resource_ssp[] = { |
@@ -568,6 +650,36 @@ struct platform_device pxa27x_device_ssp3 = { | |||
568 | .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), | 650 | .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), |
569 | }; | 651 | }; |
570 | 652 | ||
653 | static struct resource pxa27x_resource_pwm0[] = { | ||
654 | [0] = { | ||
655 | .start = 0x40b00000, | ||
656 | .end = 0x40b0001f, | ||
657 | .flags = IORESOURCE_MEM, | ||
658 | }, | ||
659 | }; | ||
660 | |||
661 | struct platform_device pxa27x_device_pwm0 = { | ||
662 | .name = "pxa27x-pwm", | ||
663 | .id = 0, | ||
664 | .resource = pxa27x_resource_pwm0, | ||
665 | .num_resources = ARRAY_SIZE(pxa27x_resource_pwm0), | ||
666 | }; | ||
667 | |||
668 | static struct resource pxa27x_resource_pwm1[] = { | ||
669 | [0] = { | ||
670 | .start = 0x40c00000, | ||
671 | .end = 0x40c0001f, | ||
672 | .flags = IORESOURCE_MEM, | ||
673 | }, | ||
674 | }; | ||
675 | |||
676 | struct platform_device pxa27x_device_pwm1 = { | ||
677 | .name = "pxa27x-pwm", | ||
678 | .id = 1, | ||
679 | .resource = pxa27x_resource_pwm1, | ||
680 | .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1), | ||
681 | }; | ||
682 | |||
571 | static struct resource pxa27x_resource_camera[] = { | 683 | static struct resource pxa27x_resource_camera[] = { |
572 | [0] = { | 684 | [0] = { |
573 | .start = 0x50000000, | 685 | .start = 0x50000000, |