[ARM] MX2: add pwm device/resources
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 16 Jan 2009 14:17:46 +0000 (15:17 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Fri, 13 Mar 2009 09:34:11 +0000 (10:34 +0100)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h

index 684d5d92c2e435f4f5d8010694186c3d967a2aa1..bef418e0e60ec7b51104a26b7033f66ecb10e39f 100644 (file)
@@ -281,6 +281,26 @@ struct platform_device mxc_fec_device = {
 };
 #endif
 
+static struct resource mxc_pwm_resources[] = {
+       [0] = {
+               .start  = PWM_BASE_ADDR,
+               .end    = PWM_BASE_ADDR + 0x0fff,
+               .flags  = IORESOURCE_MEM
+       },
+       [1] = {
+               .start   = MXC_INT_PWM,
+               .end     = MXC_INT_PWM,
+               .flags   = IORESOURCE_IRQ,
+       }
+};
+
+struct platform_device mxc_pwm_device = {
+       .name = "mxc_pwm",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(mxc_pwm_resources),
+       .resource = mxc_pwm_resources
+};
+
 /* GPIO port description */
 static struct mxc_gpio_port imx_gpio_ports[] = {
        [0] = {
index d85d5b26c986bacfbe638e99ebbcbb4efa09e2ab..94a241419af7476a7ae43ec71cf96dd5d78292b8 100644 (file)
@@ -15,3 +15,4 @@ extern struct platform_device mxc_w1_master_device;
 extern struct platform_device mxc_nand_device;
 extern struct platform_device mxc_fb_device;
 extern struct platform_device mxc_fec_device;
+extern struct platform_device mxc_pwm_device;