aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm44xx.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2013-02-06 05:21:45 -0500
committerNishanth Menon <nm@ti.com>2014-09-08 12:38:41 -0400
commitd2136bce9db79f7d983f081c5d1b6e9359714dd6 (patch)
tree1c45d33cf0d57559201f9c40d1dbb0764d4f45c9 /arch/arm/mach-omap2/pm44xx.c
parenta89726d3b4cb81b033e34cc55974a33dab3279da (diff)
ARM: OMAP5 / DRA7: PM: Set MPUSS-EMIF clock-domain static dependency
With EMIF clock-domain put under hardware supervised control, memory corruption and untraceable crashes are observed on OMAP5. Further investigation revealed that there is a weakness in the PRCM on this specific dynamic depedency. The recommendation is to set MPUSS static dependency towards EMIF clock-domain to avoid issues. This recommendation holds good for DRA7 family of devices as well. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> [rnayak@ti.com: DRA7] Signed-off-by: Rajendra Nayak <rnayak@ti.com> [nm@ti.com: conflict resolution, dra7] Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Tested-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap2/pm44xx.c')
-rw-r--r--arch/arm/mach-omap2/pm44xx.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 0dda6cf8b855..b6f243db200d 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -203,6 +203,32 @@ static inline int omap4_init_static_deps(void)
203} 203}
204 204
205/** 205/**
206 * omap5_dra7_init_static_deps - Init static clkdm dependencies on OMAP5 and
207 * DRA7
208 *
209 * The dynamic dependency between MPUSS -> EMIF is broken and has
210 * not worked as expected. The hardware recommendation is to
211 * enable static dependencies for these to avoid system
212 * lock ups or random crashes.
213 */
214static inline int omap5_dra7_init_static_deps(void)
215{
216 struct clockdomain *mpuss_clkdm, *emif_clkdm;
217 int ret;
218
219 mpuss_clkdm = clkdm_lookup("mpu_clkdm");
220 emif_clkdm = clkdm_lookup("emif_clkdm");
221 if (!mpuss_clkdm || !emif_clkdm)
222 return -EINVAL;
223
224 ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
225 if (ret)
226 pr_err("Failed to add MPUSS -> EMIF wakeup dependency\n");
227
228 return ret;
229}
230
231/**
206 * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices 232 * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices
207 * 233 *
208 * Initializes basic stuff for power management functionality. 234 * Initializes basic stuff for power management functionality.
@@ -239,10 +265,14 @@ int __init omap4_pm_init(void)
239 goto err2; 265 goto err2;
240 } 266 }
241 267
242 if (cpu_is_omap44xx()) { 268 if (cpu_is_omap44xx())
243 ret = omap4_init_static_deps(); 269 ret = omap4_init_static_deps();
244 if (ret) 270 else if (soc_is_omap54xx() || soc_is_dra7xx())
245 goto err2; 271 ret = omap5_dra7_init_static_deps();
272
273 if (ret) {
274 pr_err("Failed to initialise static dependencies.\n");
275 goto err2;
246 } 276 }
247 277
248 ret = omap4_mpuss_init(); 278 ret = omap4_mpuss_init();