aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2011-03-08 07:54:30 -0500
committerKevin Hilman <khilman@ti.com>2011-12-08 14:28:59 -0500
commit12f27826bdaf56b01cbdfc8bdeb577ebc106dee3 (patch)
tree82b759b0aebf1cf26c2d9eed30d71ae25121aa6b /arch/arm/mach-omap2
parent501f0c751de06d8484b4279131c26f58bd49a69d (diff)
ARM: OMAP4: PM: Keep static dep between MPUSS-EMIF and MPUSS-L3/L4 and DUCATI-L3
As per OMAP4430 TRM, the dynamic dependency between MPUSS -> EMIF and MPUSS -> L4PER/L3_* and DUCATI -> L3_* clockdomains is enable by default. Refer register CM_MPU_DYNAMICDEP description for details. But these dynamic dependencies doesn't work as expected. The hardware recommendation is to enable static dependencies for above clockdomains. Without this, system locks up or randomly crashes. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Acked-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Vishwanath BS <vishwanath.bs@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/pm44xx.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 8edb015f5618..715035d0512a 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -99,6 +99,8 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
99static int __init omap4_pm_init(void) 99static int __init omap4_pm_init(void)
100{ 100{
101 int ret; 101 int ret;
102 struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
103 struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
102 104
103 if (!cpu_is_omap44xx()) 105 if (!cpu_is_omap44xx())
104 return -ENODEV; 106 return -ENODEV;
@@ -111,6 +113,34 @@ static int __init omap4_pm_init(void)
111 goto err2; 113 goto err2;
112 } 114 }
113 115
116 /*
117 * The dynamic dependency between MPUSS -> MEMIF and
118 * MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
119 * expected. The hardware recommendation is to enable static
120 * dependencies for these to avoid system lock ups or random crashes.
121 */
122 mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
123 emif_clkdm = clkdm_lookup("l3_emif_clkdm");
124 l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
125 l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
126 l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
127 ducati_clkdm = clkdm_lookup("ducati_clkdm");
128 if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
129 (!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
130 goto err2;
131
132 ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
133 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
134 ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
135 ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
136 ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
137 ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
138 if (ret) {
139 pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 "
140 "wakeup dependency\n");
141 goto err2;
142 }
143
114#ifdef CONFIG_SUSPEND 144#ifdef CONFIG_SUSPEND
115 suspend_set_ops(&omap_pm_ops); 145 suspend_set_ops(&omap_pm_ops);
116#endif /* CONFIG_SUSPEND */ 146#endif /* CONFIG_SUSPEND */