From patchwork Tue Dec 7 01:25:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 380882 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 oB71f0Un027820 for ; Tue, 7 Dec 2010 01:43:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754208Ab0LGBnq (ORCPT ); Mon, 6 Dec 2010 20:43:46 -0500 Received: from utopia.booyaka.com ([72.9.107.138]:41221 "EHLO utopia.booyaka.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753617Ab0LGBnq (ORCPT ); Mon, 6 Dec 2010 20:43:46 -0500 Received: (qmail 7742 invoked by uid 1019); 7 Dec 2010 01:43:45 -0000 MBOX-Line: From nobody Mon Dec 6 18:25:09 2010 Subject: [PATCH 06/14] OMAP4: powerdomain: Add pwrdm_clear_all_prev_pwrst To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Paul Walmsley Cc: Kevin Hilman , Rajendra Nayak , Santosh Shilimkar , Benoit Cousson Date: Mon, 06 Dec 2010 18:25:09 -0700 Message-ID: <20101207012508.3708.67922.stgit@twilight.localdomain> In-Reply-To: <20101207012242.3708.45451.stgit@twilight.localdomain> References: <20101207012242.3708.45451.stgit@twilight.localdomain> User-Agent: StGit/0.15 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]); Tue, 07 Dec 2010 01:43:48 +0000 (UTC) diff --git a/arch/arm/mach-omap2/powerdomain44xx.c b/arch/arm/mach-omap2/powerdomain44xx.c index 123a25f..2903c7c 100644 --- a/arch/arm/mach-omap2/powerdomain44xx.c +++ b/arch/arm/mach-omap2/powerdomain44xx.c @@ -55,6 +55,14 @@ static int omap4_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) return 0; } +static int omap4_pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm) +{ + prm_rmw_mod_reg_bits(OMAP4430_LASTPOWERSTATEENTERED_MASK, + OMAP4430_LASTPOWERSTATEENTERED_MASK, + pwrdm->prcm_offs, OMAP4_PM_PWSTST); + return 0; +} + static int omap4_pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst) { u32 v; @@ -155,6 +163,7 @@ struct pwrdm_ops omap4_pwrdm_operations = { .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst, .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst, .pwrdm_set_lowpwrstchange = omap4_pwrdm_set_lowpwrstchange, + .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst, .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst, .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst, .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst,