From patchwork Fri Aug 19 11:55:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koyamangalath, Abhilash" X-Patchwork-Id: 1079352 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7JBtqpA003585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 19 Aug 2011 11:56:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuNfr-00072L-BH; Fri, 19 Aug 2011 11:55:43 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QuNfq-0004h5-T2; Fri, 19 Aug 2011 11:55:42 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuNfn-0004gh-PK for linux-arm-kernel@lists.infradead.org; Fri, 19 Aug 2011 11:55:40 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7JBtUWb004361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Aug 2011 06:55:32 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JBtTgV006636; Fri, 19 Aug 2011 17:25:29 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 8.3.106.1; Fri, 19 Aug 2011 17:25:30 +0530 Received: from psplinux050.india.ti.com (psplinux050.india.ti.com [172.24.162.243]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7JBtTZ0026656; Fri, 19 Aug 2011 17:25:29 +0530 (IST) Received: (from x0151633@localhost) by psplinux050.india.ti.com (8.13.1/8.13.8/Submit) id p7JBtT72012111; Fri, 19 Aug 2011 17:25:29 +0530 From: Abhilash K V To: , , Subject: [PATCH 4/4] AM3517: Fix suspend-resume sequence Date: Fri, 19 Aug 2011 17:25:27 +0530 Message-ID: <1313754927-11992-5-git-send-email-abhilash.kv@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1313754927-11992-4-git-send-email-abhilash.kv@ti.com> References: <1313754927-11992-1-git-send-email-abhilash.kv@ti.com> <1313754927-11992-2-git-send-email-abhilash.kv@ti.com> <1313754927-11992-3-git-send-email-abhilash.kv@ti.com> <1313754927-11992-4-git-send-email-abhilash.kv@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110819_075539_986928_A7880C72 X-CRM114-Status: GOOD ( 13.38 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [198.47.26.152 listed in list.dnswl.org] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: tony@atomide.com, khilman@ti.com, linux@arm.linux.org.uk, Abhilash K V X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 19 Aug 2011 11:56:14 +0000 (UTC) This patch fixes the crash seen while resuming with i2c devices enabled. This crash was happening because the interface-clocks were disabled in the suspend sequence, and not re-enabled on resumption. The current patch saves the value of the CM_ICLKEN1_CORE register before zeroing it out, and restores upon resumption. In AM3517 the interface clocks are enabled by the clock module ONLY during initialization, so the suspend sequence (in arch/arm/mach-omap2/ sleep3517.S) has to manually turn it off before executing wfi and then back on again on returning from wfi, to ensure that all interface clocks are enabled when control returns to omap_sram_idle() after waking up from idle. Reviewed-by: Vaibhav Hiremath Reviewed-by: Sanjeev Premi Signed-off-by: Abhilash K V --- arch/arm/mach-omap2/sleep3517.S | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/sleep3517.S b/arch/arm/mach-omap2/sleep3517.S index 3fceefc..070a943 100644 --- a/arch/arm/mach-omap2/sleep3517.S +++ b/arch/arm/mach-omap2/sleep3517.S @@ -55,6 +55,9 @@ loop: /* Disable SDRC and Control Module */ ldr r4, cm_iclken1_core + ldr r5, [r4] + str r5, iclk_core_enable + ldr r4, cm_iclken1_core ldr r5, clk_core_disable str r5, [r4] wait_sdrc_ok: @@ -108,7 +111,7 @@ wait_sdrc_ok: clk_core_disable: .word 0x0 iclk_core_enable: - .word 0x42 + .word 0x0 emif_phy_gate: .word 0x2620 emif_phy_enable: