diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2010-12-01 16:11:46 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-12 16:50:09 +0300 |
commit | 076762aa52de48688f6e1b6999fe58d736479f37 (patch) | |
tree | d460dbcd2fe450c49b367aa6e1ac9059240a564f /arch/arm/plat-mxc | |
parent | dbc4245bb520580fc1b01105727fde7d7cbe452d (diff) | |
download | linux-076762aa52de48688f6e1b6999fe58d736479f37.tar.xz |
ARM: mx5: dynamically allocate pwm devices
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-mxc_pwm.c | 9 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx51.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c index 3d8ebdba38ee..b0c4ae298111 100644 --- a/arch/arm/plat-mxc/devices/platform-mxc_pwm.c +++ b/arch/arm/plat-mxc/devices/platform-mxc_pwm.c @@ -40,6 +40,15 @@ const struct imx_mxc_pwm_data imx27_mxc_pwm_data __initconst = imx_mxc_pwm_data_entry_single(MX27, 0, , SZ_4K); #endif /* ifdef CONFIG_SOC_IMX27 */ +#ifdef CONFIG_SOC_IMX51 +const struct imx_mxc_pwm_data imx51_mxc_pwm_data[] __initconst = { +#define imx51_mxc_pwm_data_entry(_id, _hwid) \ + imx_mxc_pwm_data_entry(MX51, _id, _hwid, SZ_16K) + imx51_mxc_pwm_data_entry(0, 1), + imx51_mxc_pwm_data_entry(1, 2), +}; +#endif /* ifdef CONFIG_SOC_IMX51 */ + struct platform_device *__init imx_add_mxc_pwm( const struct imx_mxc_pwm_data *data) { diff --git a/arch/arm/plat-mxc/include/mach/mx51.h b/arch/arm/plat-mxc/include/mach/mx51.h index 873807f96d70..ec9ae5afa09a 100644 --- a/arch/arm/plat-mxc/include/mach/mx51.h +++ b/arch/arm/plat-mxc/include/mach/mx51.h @@ -302,7 +302,7 @@ #define MX51_MXC_INT_WDOG1 58 #define MX51_MXC_INT_WDOG2 59 #define MX51_MXC_INT_KPP 60 -#define MX51_MXC_INT_PWM1 61 +#define MX51_INT_PWM1 61 #define MX51_INT_I2C1 62 #define MX51_INT_I2C2 63 #define MX51_MXC_INT_HS_I2C 64 @@ -335,7 +335,7 @@ #define MX51_MXC_INT_SPDIF 91 #define MX51_MXC_INT_TVE 92 #define MX51_MXC_INT_FIRI 93 -#define MX51_MXC_INT_PWM2 94 +#define MX51_INT_PWM2 94 #define MX51_MXC_INT_SLIM_EXP 95 #define MX51_INT_SSI3 96 #define MX51_MXC_INT_EMI_BOOT 97 |