diff options
author | Jason Chen <jason.chen@linaro.org> | 2011-11-30 11:34:27 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-06 15:38:01 -0800 |
commit | adfbc6daa5d77b68aaeb01039b74ffc857c07d8f (patch) | |
tree | 685fb5c82e95a5bbb0bd53ba631e927d4bcb1056 | |
parent | 998a783b403e6dcea6bd1a3f2d221dbd84c96274 (diff) | |
download | linux-stable-adfbc6daa5d77b68aaeb01039b74ffc857c07d8f.tar.gz linux-stable-adfbc6daa5d77b68aaeb01039b74ffc857c07d8f.tar.bz2 linux-stable-adfbc6daa5d77b68aaeb01039b74ffc857c07d8f.zip |
MXC PWM: should active during DOZE/WAIT/DBG mode
commit c0d96aed8c6dd925afe9ea35491a0cd458642a86 upstream.
Signed-off-by: Jason Chen <jason.chen@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/arm/plat-mxc/pwm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c index 5cdbd605ac05..99d060cd3622 100644 --- a/arch/arm/plat-mxc/pwm.c +++ b/arch/arm/plat-mxc/pwm.c @@ -31,6 +31,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) @@ -76,7 +79,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; |