From patchwork Fri Mar 11 07:32:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Santosh Shilimkar X-Patchwork-Id: 627461 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 p2B7Wgl3002948 for ; Fri, 11 Mar 2011 07:33:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753528Ab1CKHdE (ORCPT ); Fri, 11 Mar 2011 02:33:04 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:50399 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752903Ab1CKHdD (ORCPT ); Fri, 11 Mar 2011 02:33:03 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p2B7WtR8030464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Mar 2011 01:32:57 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p2B7Wp8c003832; Fri, 11 Mar 2011 13:02:52 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id p2B7Wp92028573; Fri, 11 Mar 2011 13:02:51 +0530 Received: (from a0393909@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id p2B7WoVB028570; Fri, 11 Mar 2011 13:02:50 +0530 From: Santosh Shilimkar To: linux-omap@vger.kernel.org Cc: paul@pwsan.com, linux-arm-kernel@lists.infradead.org, Santosh Shilimkar , Rajendra Nayak , Kevin Hilman Subject: [PATCH V3] OMAP4: PM: Set static dependency between MPUSS-EMIF and MPUSS-L3_1 Date: Fri, 11 Mar 2011 13:02:50 +0530 Message-Id: <1299828770-28546-1-git-send-email-santosh.shilimkar@ti.com> X-Mailer: git-send-email 1.5.6.6 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 11 Mar 2011 07:33:05 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index d4ad31e..e887a5d 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -198,6 +198,7 @@ void omap4_pm_off_mode_enable(int enable) static int __init omap4_pm_init(void) { int ret; + struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; if (!cpu_is_omap44xx()) return -ENODEV; @@ -213,6 +214,35 @@ static int __init omap4_pm_init(void) (void) clkdm_for_each(clkdms_setup, NULL); + /* + * FIXME: Remove the MPUSS <-> EMIF static dependency once the + * dynamic dependency issue is root-caused. + * The dynamic dependency between MPUSS <-> MEMIF and MPUSS <-> L3_1 + * doesn't seems to work as expected and MPUSS does not wakeup + * from off-mode if the static dependency is not set between them. + * At times CPUs dead-locks with above static dependencies cleared. + */ + mpuss_clkdm = clkdm_lookup("mpuss_clkdm"); + emif_clkdm = clkdm_lookup("l3_emif_clkdm"); + l3_1_clkdm = clkdm_lookup("l3_1_clkdm"); + if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm)) + goto err2; + + ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm); + if (ret) { + pr_err("Failed to add MPUSS <-> EMIF wakeup dependency\n"); + goto err2; + } + + ret = clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm); + if (ret) { + pr_err("Failed to add MPUSS <-> L3_MAIN_1 wakeup dependency\n"); + goto err2; + } + + pr_info("OMAP4 PM: Temporary static dependency added between" + "MPUSS <-> EMIF and MPUSS <-> L3_MAIN_1.\n"); + ret = omap4_mpuss_init(); if (ret) { pr_err("Failed to initialise OMAP4 MPUSS\n");