From patchwork Wed Feb 3 19:43:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 76788 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o13JiHiu016827 for ; Wed, 3 Feb 2010 19:44:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632Ab0BCToB (ORCPT ); Wed, 3 Feb 2010 14:44:01 -0500 Received: from mail-yw0-f198.google.com ([209.85.211.198]:33713 "EHLO mail-yw0-f198.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932473Ab0BCToA (ORCPT ); Wed, 3 Feb 2010 14:44:00 -0500 Received: by mail-yw0-f198.google.com with SMTP id 36so1626263ywh.15 for ; Wed, 03 Feb 2010 11:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=7lqM+UMrTtqjXKur4Op7m6hrl/8GFuKpMM36nBpIdnA=; b=ppL5aGqzefhaiQcZtmTwkSJOzomc+8lKmPPDTztWcYpOv//KAn4Ok6fDoG4xGDNTGX m7dDDUr+dgBOwHW919oTA9p4Jl0oWgafegvxo+WBcCJ9L/zf+cdmM8xvjt+TDWzBl4Ce IL41+wYx44y9V4L6MiY3TgUtqEE9IfWo7voIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=GoOvQHNUtYSGvNTCtSsmktocU46izTzTK7uwnScj2vnvhoSxaq48eWHGE75LDmKzIA NnkZq/VW14rt1gGiTqkNUaiAV41LmX5EFgHNG86XoSMXKL/hmue71/KlRnBKM9xWk/Qu 2paNsPnxMCOZVu2aFt9v12ef9jYrs934DjUQ8= Received: by 10.150.233.8 with SMTP id f8mr560718ybh.73.1265226239644; Wed, 03 Feb 2010 11:43:59 -0800 (PST) Received: from localhost.localdomain (adsl-99-57-147-167.dsl.rcsntx.sbcglobal.net [99.57.147.167]) by mx.google.com with ESMTPS id 8sm2643079ywg.19.2010.02.03.11.43.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 11:43:58 -0800 (PST) From: Mike Turquette To: linux-omap@vger.kernel.org Cc: Mike Turquette Subject: [PATCH 2/2] OMAP3: PM: remove TWL4030 A2S script before reboot Date: Wed, 3 Feb 2010 13:43:27 -0600 Message-Id: <1265226207-22971-3-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.6.3.2 In-Reply-To: <1265226207-22971-2-git-send-email-mturquette@ti.com> References: <1265226207-22971-1-git-send-email-mturquette@ti.com> <1265226207-22971-2-git-send-email-mturquette@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 (demeter.kernel.org [140.211.167.41]); Wed, 03 Feb 2010 19:44:18 +0000 (UTC) diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 0d30e53..0d6d1d6 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -311,6 +312,8 @@ struct clk_functions omap2_clk_functions = { */ void omap2_clk_prepare_for_reboot(void) { + int err = 0; + /* REVISIT: Not ready for 343x */ #if 0 u32 rate; @@ -321,6 +324,18 @@ void omap2_clk_prepare_for_reboot(void) rate = clk_get_rate(sclk); clk_set_rate(vclk, rate); #endif + + /* + * PRCM on OMAP3 will drive SYS_OFFMODE low during DPLL3 warm reset. + * This causes Gaia sleep script to execute, usually killing VDD1 and + * VDD2 while code is running. WA is to disable the sleep script + * before warm reset. + */ +#ifdef CONFIG_TWL4030_POWER + err = twl4030_remove_script(TWL4030_SLEEP_SCRIPT); + if (err) + pr_err("twl4030: error trying to disable sleep script!\n"); +#endif } void omap3_clk_lock_dpll5(void)