From patchwork Fri Dec 3 17:03:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 378601 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 oB3H3qiD009276 for ; Fri, 3 Dec 2010 17:03:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751567Ab0LCRDu (ORCPT ); Fri, 3 Dec 2010 12:03:50 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:44352 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550Ab0LCRDt (ORCPT ); Fri, 3 Dec 2010 12:03:49 -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 oB3H3hfl029953 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Dec 2010 11:03:43 -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 oB3H3hk1019137; Fri, 3 Dec 2010 11:03:43 -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 oB3H3gf11552; Fri, 3 Dec 2010 11:03:42 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 08204C2AD; Fri, 3 Dec 2010 11:03:41 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Eduardo Valentin , Kevin Hilman , Tony Lindgren , Nishanth Menon Subject: [PATCH 5/5 v3] OMAP3630: PM: Erratum i583: disable coreoff if < ES1.2 Date: Fri, 3 Dec 2010 11:03:38 -0600 Message-Id: <1291395818-8639-6-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1291395818-8639-1-git-send-email-nm@ti.com> References: <1291395818-8639-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, 03 Dec 2010 17:03:53 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index b49e02b..ba3c0d6 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -56,6 +56,7 @@ #define OMAP343X_CONTROL_REG_VALUE_OFFSET 0xc8 #define RTA_ERRATUM_i608 (1 << 0) +#define SDRC_WAKEUP_ERRATUM_i583 (1 << 1) static u16 pm34xx_errata; #define IS_PM34XX_ERRATUM(id) (pm34xx_errata & (id)) @@ -406,6 +407,17 @@ void omap_sram_idle(void) } /* CORE */ + /* + * Erratum i583: implementation for ES rev < Es1.2 on 3630 + * We cannot enable OFF mode in a stable form for previous + * revisions, transition instead to RET + */ + if (IS_PM34XX_ERRATUM(SDRC_WAKEUP_ERRATUM_i583) && + (core_next_state == PWRDM_POWER_OFF)) { + pwrdm_set_next_pwrst(core_pwrdm, PWRDM_POWER_RET); + core_next_state = PWRDM_POWER_RET; + } + if (core_next_state < PWRDM_POWER_ON) { omap_uart_prepare_idle(0); omap_uart_prepare_idle(1); @@ -999,6 +1011,8 @@ static void __init pm_errata_configure(void) pm34xx_errata |= RTA_ERRATUM_i608; /* Enable the l2 cache toggling in sleep logic */ enable_omap3630_toggle_l2_on_restore(); + if (omap_rev() < OMAP3630_REV_ES1_2) + pm34xx_errata |= SDRC_WAKEUP_ERRATUM_i583; } }