From patchwork Wed Nov 30 03:34:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Chen X-Patchwork-Id: 5391 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9DD6323E0F for ; Wed, 30 Nov 2011 03:34:41 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 6CDB9A18193 for ; Wed, 30 Nov 2011 03:34:41 +0000 (UTC) Received: by laah2 with SMTP id h2so71051laa.11 for ; Tue, 29 Nov 2011 19:34:41 -0800 (PST) Received: by 10.152.162.10 with SMTP id xw10mr129922lab.12.1322624081081; Tue, 29 Nov 2011 19:34:41 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs35079lal; Tue, 29 Nov 2011 19:34:39 -0800 (PST) Received: by 10.52.240.206 with SMTP id wc14mr443061vdc.126.1322624076774; Tue, 29 Nov 2011 19:34:36 -0800 (PST) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com. [216.32.181.184]) by mx.google.com with ESMTPS id x14si140121vcv.159.2011.11.29.19.34.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Nov 2011 19:34:36 -0800 (PST) Received-SPF: neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of jason.chen@linaro.org) client-ip=216.32.181.184; Authentication-Results: mx.google.com; spf=neutral (google.com: 216.32.181.184 is neither permitted nor denied by best guess record for domain of jason.chen@linaro.org) smtp.mail=jason.chen@linaro.org Received: from mail58-ch1-R.bigfish.com (10.43.68.246) by CH1EHSOBE013.bigfish.com (10.43.70.63) with Microsoft SMTP Server id 14.1.225.22; Wed, 30 Nov 2011 03:34:34 +0000 Received: from mail58-ch1 (localhost [127.0.0.1]) by mail58-ch1-R.bigfish.com (Postfix) with ESMTP id 2B459520329; Wed, 30 Nov 2011 03:34:35 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275dhz2dh87h2a8h668h839h) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail58-ch1 (localhost.localdomain [127.0.0.1]) by mail58-ch1 (MessageSwitch) id 1322624072749969_17025; Wed, 30 Nov 2011 03:34:32 +0000 (UTC) Received: from CH1EHSMHS014.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.243]) by mail58-ch1.bigfish.com (Postfix) with ESMTP id B238A20019; Wed, 30 Nov 2011 03:34:32 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS014.bigfish.com (10.43.70.14) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 30 Nov 2011 03:34:32 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.339.2; Tue, 29 Nov 2011 21:34:31 -0600 Received: from weitway.ap.freescale.net (weitway.ap.freescale.net [10.192.242.173]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pAU3YTSP017359; Tue, 29 Nov 2011 21:34:29 -0600 (CST) From: Jason Chen To: CC: , Subject: [PATCH] MXC PWM: should active during DOZE/WAIT/DBG mode Date: Wed, 30 Nov 2011 11:34:27 +0800 Message-ID: <1322624067-3591-1-git-send-email-jason.chen@linaro.org> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com Signed-off-by: Jason Chen --- 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 5dda436..9ba9c2c 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) @@ -78,7 +81,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;