Merge branch 'pull/v3.18/for-omap-soc' of https://github.com/nmenon/linux-2.6-playground into omap-for-v3.18/soc
This commit is contained in:
@@ -37,6 +37,8 @@ struct power_state {
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
static u32 cpu_suspend_state = PWRDM_POWER_OFF;
|
||||
|
||||
static LIST_HEAD(pwrst_list);
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
@@ -67,7 +69,7 @@ static int omap4_pm_suspend(void)
|
||||
* domain CSWR is not supported by hardware.
|
||||
* More details can be found in OMAP4430 TRM section 4.3.4.2.
|
||||
*/
|
||||
omap4_enter_lowpower(cpu_id, PWRDM_POWER_OFF);
|
||||
omap4_enter_lowpower(cpu_id, cpu_suspend_state);
|
||||
|
||||
/* Restore next powerdomain state */
|
||||
list_for_each_entry(pwrst, &pwrst_list, node) {
|
||||
@@ -113,8 +115,11 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
|
||||
* through hotplug path and CPU0 explicitly programmed
|
||||
* further down in the code path
|
||||
*/
|
||||
if (!strncmp(pwrdm->name, "cpu", 3))
|
||||
if (!strncmp(pwrdm->name, "cpu", 3)) {
|
||||
if (IS_PM44XX_ERRATUM(PM_OMAP4_CPU_OSWR_DISABLE))
|
||||
cpu_suspend_state = PWRDM_POWER_RET;
|
||||
return 0;
|
||||
}
|
||||
|
||||
pwrst = kmalloc(sizeof(struct power_state), GFP_ATOMIC);
|
||||
if (!pwrst)
|
||||
@@ -207,6 +212,32 @@ static inline int omap4_init_static_deps(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* omap5_dra7_init_static_deps - Init static clkdm dependencies on OMAP5 and
|
||||
* DRA7
|
||||
*
|
||||
* The dynamic dependency between MPUSS -> EMIF is broken and has
|
||||
* not worked as expected. The hardware recommendation is to
|
||||
* enable static dependencies for these to avoid system
|
||||
* lock ups or random crashes.
|
||||
*/
|
||||
static inline int omap5_dra7_init_static_deps(void)
|
||||
{
|
||||
struct clockdomain *mpuss_clkdm, *emif_clkdm;
|
||||
int ret;
|
||||
|
||||
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("Failed to add MPUSS -> EMIF wakeup dependency\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices
|
||||
*
|
||||
@@ -217,6 +248,9 @@ int __init omap4_pm_init_early(void)
|
||||
if (cpu_is_omap446x())
|
||||
pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
|
||||
|
||||
if (soc_is_omap54xx() || soc_is_dra7xx())
|
||||
pm44xx_errata |= PM_OMAP4_CPU_OSWR_DISABLE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -244,10 +278,14 @@ 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() || soc_is_dra7xx())
|
||||
ret = omap5_dra7_init_static_deps();
|
||||
|
||||
if (ret) {
|
||||
pr_err("Failed to initialise static dependencies.\n");
|
||||
goto err2;
|
||||
}
|
||||
|
||||
ret = omap4_mpuss_init();
|
||||
|
Reference in New Issue
Block a user