From patchwork Fri Oct 16 10:48:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 54217 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 n9GB8hRR026877 for ; Fri, 16 Oct 2009 11:08:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758072AbZJPLEQ (ORCPT ); Fri, 16 Oct 2009 07:04:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758006AbZJPLEQ (ORCPT ); Fri, 16 Oct 2009 07:04:16 -0400 Received: from smtp.nokia.com ([192.100.122.230]:51239 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753463AbZJPLEP (ORCPT ); Fri, 16 Oct 2009 07:04:15 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2Qcq001617 for ; Fri, 16 Oct 2009 14:02:46 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:44 +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:44 +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 n9GB2fZt022261 for ; Fri, 16 Oct 2009 14:02:43 +0300 From: Tero Kristo To: linux-omap@vger.kernel.org Subject: [PATCH 01/17] PM: fix suspend control for IVA2 Date: Fri, 16 Oct 2009 13:48:54 +0300 Message-Id: <1255690150-16853-2-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1255690150-16853-1-git-send-email-tero.kristo@nokia.com> References: <> <1255690150-16853-1-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 16 Oct 2009 11:02:44.0255 (UTC) FILETIME=[2FF70AF0: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 a3e3729..5e2ef63 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -81,7 +81,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; +static struct powerdomain *cam_pwrdm, *iva2_pwrdm; static struct prm_setup_vc prm_setup = { .clksetup = 0xff, @@ -676,6 +676,12 @@ static int omap3_pm_suspend(void) pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); /* Set ones wanted by suspend */ list_for_each_entry(pwrst, &pwrst_list, node) { + /* Special handling for IVA2, just use current sleep state */ + if (pwrst->pwrdm == iva2_pwrdm) { + state = pwrdm_read_pwrst(pwrst->pwrdm); + if (state < PWRDM_POWER_ON) + pwrst->next_state = state; + } if (set_pwrdm_state(pwrst->pwrdm, pwrst->next_state)) goto restore; if (pwrdm_clear_all_prev_pwrst(pwrst->pwrdm)) @@ -1183,6 +1189,7 @@ static int __init omap3_pm_init(void) per_pwrdm = pwrdm_lookup("per_pwrdm"); core_pwrdm = pwrdm_lookup("core_pwrdm"); cam_pwrdm = pwrdm_lookup("cam_pwrdm"); + iva2_pwrdm = pwrdm_lookup("iva2_pwrdm"); omap_push_sram_idle(); #ifdef CONFIG_SUSPEND