From patchwork Fri Nov 19 01:54:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 338091 X-Patchwork-Delegate: khilman@deeprootsystems.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 oAJ1tCVj025169 for ; Fri, 19 Nov 2010 01:55:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760304Ab0KSBzS (ORCPT ); Thu, 18 Nov 2010 20:55:18 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:38896 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756417Ab0KSBzC (ORCPT ); Thu, 18 Nov 2010 20:55:02 -0500 Received: from dlep35.itg.ti.com ([157.170.170.118]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oAJ1t0V7006685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 19:55:00 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id oAJ1sxrn003810; Thu, 18 Nov 2010 19:54:59 -0600 (CST) Received: from senorita (senorita.am.dhcp.ti.com [128.247.74.250]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oAJ1sxf12093; Thu, 18 Nov 2010 19:54:59 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 0B9D4C2B0; Thu, 18 Nov 2010 19:54:58 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Kevin , Jean Pihet , Vishwanath Sripathy , Tony Subject: [PATCH 08/13] OMAP3: PM: Deny MPU idle while saving secure RAM Date: Thu, 18 Nov 2010 19:54:53 -0600 Message-Id: <1290131698-6194-9-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1290131698-6194-1-git-send-email-nm@ti.com> References: <1290131698-6194-1-git-send-email-nm@ti.com> 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]); Fri, 19 Nov 2010 01:55:36 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 7877f74..f520b38 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -194,15 +194,19 @@ int __init omap3_secure_copy_data_set(struct omap3_secure_copy_data *data) static void omap3_save_secure_ram_context(u32 target_mpu_state) { if (!secure_ram_saved && omap_type() != OMAP2_DEVICE_TYPE_GP) { + struct clockdomain *clkd = mpu_pwrdm->pwrdm_clkdms[0]; + /* * MPU next state must be set to POWER_ON temporarily, * otherwise the WFI executed inside the ROM code * will hang the system. */ pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); + omap2_clkdm_deny_idle(clkd); secure_ram_save_status = _omap_save_secure_sram((u32 *) (omap3_secure_ram_storage)); pwrdm_set_next_pwrst(mpu_pwrdm, target_mpu_state); + omap2_clkdm_allow_idle(clkd); if (!secure_copy_data.save_every_cycle) secure_ram_saved = 1; }