@@ -195,6 +195,37 @@ static inline int omap4_init_static_deps(void)
}
/**
+ * omap5_init_static_deps - Add OMAP5 static dependencies
+ *
+ * Add needed static clockdomain dependencies on OMAP5 devices.
+ * Return: 0 on success or 'err' on failures
+ */
+static inline int omap5_init_static_deps(void)
+{
+ struct clockdomain *mpuss_clkdm, *emif_clkdm;
+ int ret = 0;
+
+ /*
+ * The dynamic dependency between MPUSS -> EMIF is broken and has
+ * not worked as expected on OMAP5 too. Async bridge issue which
+ * resulted in memory corruption and lock on OMAP4 continue to
+ * exist on OMAP5 too and hence the MPU -> EMIF dependency to avoid
+ * random crashes and lockups.
+ */
+ mpuss_clkdm = clkdm_lookup("mpu_clkdm");
+ emif_clkdm = clkdm_lookup("emif_clkdm");
+ if (!mpuss_clkdm || !emif_clkdm)
+ return -EINVAL;
+
+ ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
+ if (ret)
+ pr_err("%s: Failed to add static dependency with %d\n",
+ __func__, ret);
+
+ return ret;
+}
+
+/**
* omap4_pm_init - Init routine for OMAP4+ devices
*
* Initializes all powerdomain and clockdomain target states
@@ -218,10 +249,15 @@ int __init omap4_pm_init(void)
goto err2;
}
- if (cpu_is_omap44xx()) {
+ if (cpu_is_omap44xx())
ret = omap4_init_static_deps();
- if (ret)
- goto err2;
+ else if (soc_is_omap54xx())
+ ret = omap5_init_static_deps();
+
+ if (ret) {
+ pr_err("%s: Failed to initialise static dependency with %d\n",
+ __func__, ret);
+ goto err2;
}
ret = omap4_mpuss_init();