summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/pwm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-12-16 10:07:50 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-12-16 10:07:50 -0800
commit3f5fcf60e912a79721cbbd63704a03bbfb92eac2 (patch)
tree01c73f4add03f797c4570c2dbbe7ca6e16f034b7 /arch/arm/plat-mxc/pwm.c
parentb0d78ee89c4ac1e99dda52f304baf82bd2a6c946 (diff)
parent98bf55c4ab8bb95096905bd20d20551f2c12eb3f (diff)
downloadlwn-3f5fcf60e912a79721cbbd63704a03bbfb92eac2.tar.gz
lwn-3f5fcf60e912a79721cbbd63704a03bbfb92eac2.zip
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: OMAP: rx51: fix USB ARM: OMAP: mcbsp: Fix possible memory corruption arm/imx: fix power button on imx51 babbage board ARM: imx: fix cpufreq build errors ARM: mx5: add __initconst for fec pdata MXC PWM: should active during DOZE/WAIT/DBG mode ARM: EXYNOS: Fix build error without CONFIG_LOCAL_TIMERS ARM: EXYNOS: Fix for stall in case of cpu hotplug or sleep ARM: S5PV210: Set 1000ns as PWM backlight period on SMDKV210 ARM: SAMSUNG: remove duplicated header include
Diffstat (limited to 'arch/arm/plat-mxc/pwm.c')
-rw-r--r--arch/arm/plat-mxc/pwm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 42d74ea59084..845de59f07ed 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -32,6 +32,9 @@
#define MX3_PWMSAR 0x0C /* PWM Sample Register */
#define MX3_PWMPR 0x10 /* PWM Period Register */
#define MX3_PWMCR_PRESCALER(x) (((x - 1) & 0xFFF) << 4)
+#define MX3_PWMCR_DOZEEN (1 << 24)
+#define MX3_PWMCR_WAITEN (1 << 23)
+#define MX3_PWMCR_DBGEN (1 << 22)
#define MX3_PWMCR_CLKSRC_IPG_HIGH (2 << 16)
#define MX3_PWMCR_CLKSRC_IPG (1 << 16)
#define MX3_PWMCR_EN (1 << 0)
@@ -77,7 +80,9 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR);
writel(period_cycles, pwm->mmio_base + MX3_PWMPR);
- cr = MX3_PWMCR_PRESCALER(prescale) | MX3_PWMCR_EN;
+ cr = MX3_PWMCR_PRESCALER(prescale) |
+ MX3_PWMCR_DOZEEN | MX3_PWMCR_WAITEN |
+ MX3_PWMCR_DBGEN | MX3_PWMCR_EN;
if (cpu_is_mx25())
cr |= MX3_PWMCR_CLKSRC_IPG;