From patchwork Mon Dec 13 21:49:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Cousson X-Patchwork-Id: 407712 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBDLnoTD032192 for ; Mon, 13 Dec 2010 21:50:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756600Ab0LMVuo (ORCPT ); Mon, 13 Dec 2010 16:50:44 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:32779 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755498Ab0LMVun (ORCPT ); Mon, 13 Dec 2010 16:50:43 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBDLoY1i026260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Dec 2010 15:50:34 -0600 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id oBDLoXf0007239; Mon, 13 Dec 2010 15:50:33 -0600 (CST) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBDLoXpl028818; Mon, 13 Dec 2010 15:50:33 -0600 (CST) Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Mon, 13 Dec 2010 15:50:33 -0600 Received: from localhost.localdomain (lncpu04.tif.ti.com [137.167.102.15]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBDLngc8006241; Mon, 13 Dec 2010 15:50:32 -0600 From: Benoit Cousson To: CC: , , , Rajendra Nayak , Santosh Shilimkar Subject: [PATCH 1/5] OMAP4: PM: Use the lowpwrstatechange feature on OMAP4 Date: Mon, 13 Dec 2010 22:49:25 +0100 Message-ID: <1292276969-29733-2-git-send-email-b-cousson@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1292276969-29733-1-git-send-email-b-cousson@ti.com> References: <1292276969-29733-1-git-send-email-b-cousson@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Dec 2010 21:50:44 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index cf1c4c9..dc68044 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -114,6 +114,14 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) return ret; if (pwrdm_read_pwrst(pwrdm) < PWRDM_POWER_ON) { + if ((pwrdm_read_pwrst(pwrdm) > state) && + (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { + ret = pwrdm_set_next_pwrst(pwrdm, state); + pwrdm_set_lowpwrstchange(pwrdm); + pwrdm_wait_transition(pwrdm); + pwrdm_state_switch(pwrdm); + return ret; + } omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); sleep_switch = 1; pwrdm_wait_transition(pwrdm);