DORMANTno replies REVIEWED: 4 (4M)

1 review trailer.

[PATCH v2] OMAP4: PM: Set static dependency between MPUSS and EMIF

From: Santosh Shilimkar <hidden>
Date: 2011-03-09 06:02:41
Also in: linux-omap
Subsystem: arm port, omap power management support, omap2+ support, the rest · Maintainers: Russell King, Kevin Hilman, Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Linus Torvalds

As per OMAP4430 TRM, the dynamic dependency between MEMIF and MPUSS
clockdomains is enable by default. Refer register CM_MPU_DYNAMICDEP
description for details.

But it doesn't seems to work as expected and MPUSS doesn't wakeup
from off-mode if the static dependency is not set between MPUSS and
EMIF clockdomains. i.e CM_MPU_STATICDEP.MEMIF_STATDEP = 0

The issue is under investigation with hardware team.

Signed-off-by: Rajendra Nayak <redacted>
Signed-off-by: Santosh Shilimkar <redacted>
Acked-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <redacted>
---
v2: Added a pr_info() suggested by Paul Walmsley

Patch applies on top of OMAP4 PM series.
Relevant thread on this issue:
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg46173.html

 arch/arm/mach-omap2/pm44xx.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index d4ad31e..b3ce1b1 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;
 
 	if (!cpu_is_omap44xx())
 		return -ENODEV;
@@ -213,6 +214,27 @@ 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 MEMIF and MPUSS doesn't seems to
+	 * work as expected and MPUSS does not wakeup from off-mode if
+	 * the static dependency is not set between them.
+	 * i.e. CM_MPU_STATICDEP.MEMIF_STATDEP = 0
+	 */
+	mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
+	emif_clkdm = clkdm_lookup("l3_emif_clkdm");
+	if ((!mpuss_clkdm) || (!emif_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;
+	}
+	
+	pr_info("OMAP4 PM: Temporary static dependency added between EMIF and MPUSS\n");
+
 	ret = omap4_mpuss_init();
 	if (ret) {
 		pr_err("Failed to initialise OMAP4 MPUSS\n");
-- 
1.6.0.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help