aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index d6c05b6eab35..4a1eebb42e49 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -10,11 +10,13 @@
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>
16 17
17#include "devices.h" 18#include "devices.h"
19#include "generic.h"
18 20
19void __init pxa_register_device(struct platform_device *dev, void *data) 21void __init pxa_register_device(struct platform_device *dev, void *data)
20{ 22{
@@ -233,8 +235,15 @@ struct platform_device pxa_device_i2c = {
233 .num_resources = ARRAY_SIZE(pxai2c_resources), 235 .num_resources = ARRAY_SIZE(pxai2c_resources),
234}; 236};
235 237
238static unsigned long pxa27x_i2c_mfp_cfg[] = {
239 GPIO117_I2C_SCL,
240 GPIO118_I2C_SDA,
241};
242
236void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) 243void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
237{ 244{
245 if (cpu_is_pxa27x())
246 pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg));
238 pxa_register_device(&pxa_device_i2c, info); 247 pxa_register_device(&pxa_device_i2c, info);
239} 248}
240 249
@@ -280,6 +289,36 @@ struct platform_device pxa_device_rtc = {
280 289
281#ifdef CONFIG_PXA25x 290#ifdef CONFIG_PXA25x
282 291
292static struct resource pxa25x_resource_pwm0[] = {
293 [0] = {
294 .start = 0x40b00000,
295 .end = 0x40b0000f,
296 .flags = IORESOURCE_MEM,
297 },
298};
299
300struct platform_device pxa25x_device_pwm0 = {
301 .name = "pxa25x-pwm",
302 .id = 0,
303 .resource = pxa25x_resource_pwm0,
304 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm0),
305};
306
307static struct resource pxa25x_resource_pwm1[] = {
308 [0] = {
309 .start = 0x40c00000,
310 .end = 0x40c0000f,
311 .flags = IORESOURCE_MEM,
312 },
313};
314
315struct platform_device pxa25x_device_pwm1 = {
316 .name = "pxa25x-pwm",
317 .id = 1,
318 .resource = pxa25x_resource_pwm1,
319 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm1),
320};
321
283static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32); 322static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
284 323
285static struct resource pxa25x_resource_ssp[] = { 324static struct resource pxa25x_resource_ssp[] = {
@@ -568,6 +607,36 @@ struct platform_device pxa27x_device_ssp3 = {
568 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), 607 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
569}; 608};
570 609
610static struct resource pxa27x_resource_pwm0[] = {
611 [0] = {
612 .start = 0x40b00000,
613 .end = 0x40b0001f,
614 .flags = IORESOURCE_MEM,
615 },
616};
617
618struct platform_device pxa27x_device_pwm0 = {
619 .name = "pxa27x-pwm",
620 .id = 0,
621 .resource = pxa27x_resource_pwm0,
622 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm0),
623};
624
625static struct resource pxa27x_resource_pwm1[] = {
626 [0] = {
627 .start = 0x40c00000,
628 .end = 0x40c0001f,
629 .flags = IORESOURCE_MEM,
630 },
631};
632
633struct platform_device pxa27x_device_pwm1 = {
634 .name = "pxa27x-pwm",
635 .id = 1,
636 .resource = pxa27x_resource_pwm1,
637 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1),
638};
639
571static struct resource pxa27x_resource_camera[] = { 640static struct resource pxa27x_resource_camera[] = {
572 [0] = { 641 [0] = {
573 .start = 0x50000000, 642 .start = 0x50000000,