aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2008-04-13 16:44:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-05-19 11:25:39 -0400
commit75540c1ac3c7bd72ac8e092058f9714875239995 (patch)
tree9d6dc7cb389f879be36a1583ce8949023a55dd2d /arch/arm/mach-pxa/devices.c
parent1a189b97190d3f0f8cf0379a799d3555b2d648bb (diff)
[ARM] pxa: Add PXA support for PWM API
Patch mainly from Eric Miao, with minor edits by rmk. Note: PWM0 and PWM2 share the same register I/O space and clock gating on pxa{27x, 3xx}, thus PWM2 is treated in the driver as a child PWM of PWM0. And this is also true for PWM1/3. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index d6c05b6eab35..794a1076db73 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -280,6 +280,36 @@ struct platform_device pxa_device_rtc = {
280 280
281#ifdef CONFIG_PXA25x 281#ifdef CONFIG_PXA25x
282 282
283static struct resource pxa25x_resource_pwm0[] = {
284 [0] = {
285 .start = 0x40b00000,
286 .end = 0x40b0000f,
287 .flags = IORESOURCE_MEM,
288 },
289};
290
291struct platform_device pxa25x_device_pwm0 = {
292 .name = "pxa25x-pwm",
293 .id = 0,
294 .resource = pxa25x_resource_pwm0,
295 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm0),
296};
297
298static struct resource pxa25x_resource_pwm1[] = {
299 [0] = {
300 .start = 0x40c00000,
301 .end = 0x40c0000f,
302 .flags = IORESOURCE_MEM,
303 },
304};
305
306struct platform_device pxa25x_device_pwm1 = {
307 .name = "pxa25x-pwm",
308 .id = 1,
309 .resource = pxa25x_resource_pwm1,
310 .num_resources = ARRAY_SIZE(pxa25x_resource_pwm1),
311};
312
283static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32); 313static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
284 314
285static struct resource pxa25x_resource_ssp[] = { 315static struct resource pxa25x_resource_ssp[] = {
@@ -568,6 +598,36 @@ struct platform_device pxa27x_device_ssp3 = {
568 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3), 598 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
569}; 599};
570 600
601static struct resource pxa27x_resource_pwm0[] = {
602 [0] = {
603 .start = 0x40b00000,
604 .end = 0x40b0001f,
605 .flags = IORESOURCE_MEM,
606 },
607};
608
609struct platform_device pxa27x_device_pwm0 = {
610 .name = "pxa27x-pwm",
611 .id = 0,
612 .resource = pxa27x_resource_pwm0,
613 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm0),
614};
615
616static struct resource pxa27x_resource_pwm1[] = {
617 [0] = {
618 .start = 0x40c00000,
619 .end = 0x40c0001f,
620 .flags = IORESOURCE_MEM,
621 },
622};
623
624struct platform_device pxa27x_device_pwm1 = {
625 .name = "pxa27x-pwm",
626 .id = 1,
627 .resource = pxa27x_resource_pwm1,
628 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1),
629};
630
571static struct resource pxa27x_resource_camera[] = { 631static struct resource pxa27x_resource_camera[] = {
572 [0] = { 632 [0] = {
573 .start = 0x50000000, 633 .start = 0x50000000,