From patchwork Fri Oct 16 10:48:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 54228 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9GB8hRY026877 for ; Fri, 16 Oct 2009 11:08:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758430AbZJPLEd (ORCPT ); Fri, 16 Oct 2009 07:04:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757717AbZJPLEd (ORCPT ); Fri, 16 Oct 2009 07:04:33 -0400 Received: from smtp.nokia.com ([192.100.122.233]:32284 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758322AbZJPLEb (ORCPT ); Fri, 16 Oct 2009 07:04:31 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2f4m011809; Fri, 16 Oct 2009 14:03:02 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:47 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:46 +0300 Received: from localhost.localdomain (sokoban.ntc.nokia.com [172.22.144.95]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2fZv022261; Fri, 16 Oct 2009 14:02:45 +0300 From: Tero Kristo To: linux-omap@vger.kernel.org Cc: Kalle Jokiniemi Subject: [PATCH 03/17] PM: Block CORE off when DSS is active Date: Fri, 16 Oct 2009 13:48:56 +0300 Message-Id: <1255690150-16853-4-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1255690150-16853-3-git-send-email-tero.kristo@nokia.com> References: <> <1255690150-16853-1-git-send-email-tero.kristo@nokia.com> <1255690150-16853-2-git-send-email-tero.kristo@nokia.com> <1255690150-16853-3-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 16 Oct 2009 11:02:46.0692 (UTC) FILETIME=[316AE640:01CA4E50] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e8704a6..52a3f2b 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -103,7 +103,7 @@ static int (*_omap_save_secure_sram)(u32 *addr); static struct powerdomain *mpu_pwrdm, *neon_pwrdm; static struct powerdomain *core_pwrdm, *per_pwrdm; -static struct powerdomain *cam_pwrdm, *iva2_pwrdm; +static struct powerdomain *cam_pwrdm, *iva2_pwrdm, *dss_pwrdm; static struct prm_setup_vc prm_setup = { .clksetup = 0xff, @@ -427,6 +427,7 @@ void omap_sram_idle(void) int mpu_next_state = PWRDM_POWER_ON; int per_next_state = PWRDM_POWER_ON; int core_next_state = PWRDM_POWER_ON; + int dss_state = PWRDM_POWER_ON; int core_prev_state, per_prev_state; u32 sdrc_pwr = 0; int per_state_modified = 0; @@ -469,6 +470,7 @@ void omap_sram_idle(void) * save / restore. */ core_next_state = pwrdm_read_next_pwrst(core_pwrdm); + dss_state = pwrdm_read_pwrst(dss_pwrdm); if (core_next_state < PWRDM_POWER_ON) { core_saved_state = core_next_state; if ((cm_read_mod_reg(CORE_MOD, CM_IDLEST1) & CORE_IDLEST1_ALL) @@ -479,6 +481,10 @@ void omap_sram_idle(void) CORE_IDLEST3_ALL) != CORE_IDLEST3_ALL) { core_next_state = PWRDM_POWER_ON; pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_ON); + } else if (core_next_state == PWRDM_POWER_OFF && + dss_state == PWRDM_POWER_ON) { + core_next_state = PWRDM_POWER_RET; + pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET); } } @@ -1234,6 +1240,7 @@ static int __init omap3_pm_init(void) core_pwrdm = pwrdm_lookup("core_pwrdm"); cam_pwrdm = pwrdm_lookup("cam_pwrdm"); iva2_pwrdm = pwrdm_lookup("iva2_pwrdm"); + dss_pwrdm = pwrdm_lookup("dss_pwrdm"); omap_push_sram_idle(); #ifdef CONFIG_SUSPEND