summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx2
diff options
context:
space:
mode:
authorSascha Hauer2009-01-16 15:17:46 +0100
committerSascha Hauer2009-03-13 10:34:11 +0100
commit824b16e66b70f5df61345f5708c149f6886eef30 (patch)
tree176a6755c3f78732370104e40ea5f917ba57a713 /arch/arm/mach-mx2
parent[ARM] MXC: add pwm driver for i.MX SoCs (diff)
downloadkernel-qcow2-linux-824b16e66b70f5df61345f5708c149f6886eef30.tar.gz
kernel-qcow2-linux-824b16e66b70f5df61345f5708c149f6886eef30.tar.xz
kernel-qcow2-linux-824b16e66b70f5df61345f5708c149f6886eef30.zip
[ARM] MX2: add pwm device/resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx2')
-rw-r--r--arch/arm/mach-mx2/devices.c20
-rw-r--r--arch/arm/mach-mx2/devices.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c
index 684d5d92c2e4..bef418e0e60e 100644
--- a/arch/arm/mach-mx2/devices.c
+++ b/arch/arm/mach-mx2/devices.c
@@ -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] = {
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h
index d85d5b26c986..94a241419af7 100644
--- a/arch/arm/mach-mx2/devices.h
+++ b/arch/arm/mach-mx2/devices.h
@@ -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;