Merge branch 'for_3.4/fixes/pm' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into fixes
This commit is contained in:
commit
08956f1c58
|
@ -64,10 +64,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
|
||||||
}
|
}
|
||||||
oh = omap_hwmod_lookup(opp_def->hwmod_name);
|
oh = omap_hwmod_lookup(opp_def->hwmod_name);
|
||||||
if (!oh || !oh->od) {
|
if (!oh || !oh->od) {
|
||||||
pr_warn("%s: no hwmod or odev for %s, [%d] "
|
pr_debug("%s: no hwmod or odev for %s, [%d] "
|
||||||
"cannot add OPPs.\n", __func__,
|
"cannot add OPPs.\n", __func__,
|
||||||
opp_def->hwmod_name, i);
|
opp_def->hwmod_name, i);
|
||||||
return -EINVAL;
|
continue;
|
||||||
}
|
}
|
||||||
dev = &oh->od->pdev->dev;
|
dev = &oh->od->pdev->dev;
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,7 @@ static void omap3_save_secure_ram_context(void)
|
||||||
pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
|
pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state);
|
||||||
/* Following is for error tracking, it should not happen */
|
/* Following is for error tracking, it should not happen */
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "save_secure_sram() returns %08x\n",
|
pr_err("save_secure_sram() returns %08x\n", ret);
|
||||||
ret);
|
|
||||||
while (1)
|
while (1)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -289,7 +288,7 @@ void omap_sram_idle(void)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Invalid state */
|
/* Invalid state */
|
||||||
printk(KERN_ERR "Invalid mpu state in sram_idle\n");
|
pr_err("Invalid mpu state in sram_idle\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,18 +438,17 @@ restore:
|
||||||
list_for_each_entry(pwrst, &pwrst_list, node) {
|
list_for_each_entry(pwrst, &pwrst_list, node) {
|
||||||
state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
|
state = pwrdm_read_prev_pwrst(pwrst->pwrdm);
|
||||||
if (state > pwrst->next_state) {
|
if (state > pwrst->next_state) {
|
||||||
printk(KERN_INFO "Powerdomain (%s) didn't enter "
|
pr_info("Powerdomain (%s) didn't enter "
|
||||||
"target state %d\n",
|
"target state %d\n",
|
||||||
pwrst->pwrdm->name, pwrst->next_state);
|
pwrst->pwrdm->name, pwrst->next_state);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
|
omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
|
||||||
}
|
}
|
||||||
if (ret)
|
if (ret)
|
||||||
printk(KERN_ERR "Could not enter target state in pm_suspend\n");
|
pr_err("Could not enter target state in pm_suspend\n");
|
||||||
else
|
else
|
||||||
printk(KERN_INFO "Successfully put all powerdomains "
|
pr_info("Successfully put all powerdomains to target state\n");
|
||||||
"to target state\n");
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -734,21 +732,22 @@ static int __init omap3_pm_init(void)
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("pm: Failed to request pm_io irq\n");
|
pr_err("pm: Failed to request pm_io irq\n");
|
||||||
goto err1;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = pwrdm_for_each(pwrdms_setup, NULL);
|
ret = pwrdm_for_each(pwrdms_setup, NULL);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
printk(KERN_ERR "Failed to setup powerdomains\n");
|
pr_err("Failed to setup powerdomains\n");
|
||||||
goto err2;
|
goto err3;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
|
(void) clkdm_for_each(omap_pm_clkdms_setup, NULL);
|
||||||
|
|
||||||
mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
|
mpu_pwrdm = pwrdm_lookup("mpu_pwrdm");
|
||||||
if (mpu_pwrdm == NULL) {
|
if (mpu_pwrdm == NULL) {
|
||||||
printk(KERN_ERR "Failed to get mpu_pwrdm\n");
|
pr_err("Failed to get mpu_pwrdm\n");
|
||||||
goto err2;
|
ret = -EINVAL;
|
||||||
|
goto err3;
|
||||||
}
|
}
|
||||||
|
|
||||||
neon_pwrdm = pwrdm_lookup("neon_pwrdm");
|
neon_pwrdm = pwrdm_lookup("neon_pwrdm");
|
||||||
|
@ -781,8 +780,8 @@ static int __init omap3_pm_init(void)
|
||||||
omap3_secure_ram_storage =
|
omap3_secure_ram_storage =
|
||||||
kmalloc(0x803F, GFP_KERNEL);
|
kmalloc(0x803F, GFP_KERNEL);
|
||||||
if (!omap3_secure_ram_storage)
|
if (!omap3_secure_ram_storage)
|
||||||
printk(KERN_ERR "Memory allocation failed when"
|
pr_err("Memory allocation failed when "
|
||||||
"allocating for secure sram context\n");
|
"allocating for secure sram context\n");
|
||||||
|
|
||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
local_fiq_disable();
|
local_fiq_disable();
|
||||||
|
@ -796,14 +795,17 @@ static int __init omap3_pm_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
omap3_save_scratchpad_contents();
|
omap3_save_scratchpad_contents();
|
||||||
err1:
|
|
||||||
return ret;
|
return ret;
|
||||||
err2:
|
|
||||||
free_irq(INT_34XX_PRCM_MPU_IRQ, NULL);
|
err3:
|
||||||
list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) {
|
list_for_each_entry_safe(pwrst, tmp, &pwrst_list, node) {
|
||||||
list_del(&pwrst->node);
|
list_del(&pwrst->node);
|
||||||
kfree(pwrst);
|
kfree(pwrst);
|
||||||
}
|
}
|
||||||
|
free_irq(omap_prcm_event_to_irq("io"), omap3_pm_init);
|
||||||
|
err2:
|
||||||
|
free_irq(omap_prcm_event_to_irq("wkup"), NULL);
|
||||||
|
err1:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ static void omap_default_idle(void)
|
||||||
static int __init omap4_pm_init(void)
|
static int __init omap4_pm_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
|
struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm, *l4wkup;
|
||||||
struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
|
struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
|
||||||
|
|
||||||
if (!cpu_is_omap44xx())
|
if (!cpu_is_omap44xx())
|
||||||
|
@ -168,14 +168,19 @@ static int __init omap4_pm_init(void)
|
||||||
* MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
|
* MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
|
||||||
* expected. The hardware recommendation is to enable static
|
* expected. The hardware recommendation is to enable static
|
||||||
* dependencies for these to avoid system lock ups or random crashes.
|
* dependencies for these to avoid system lock ups or random crashes.
|
||||||
|
* The L4 wakeup depedency is added to workaround the OCP sync hardware
|
||||||
|
* BUG with 32K synctimer which lead to incorrect timer value read
|
||||||
|
* from the 32K counter. The BUG applies for GPTIMER1 and WDT2 which
|
||||||
|
* are part of L4 wakeup clockdomain.
|
||||||
*/
|
*/
|
||||||
mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
|
mpuss_clkdm = clkdm_lookup("mpuss_clkdm");
|
||||||
emif_clkdm = clkdm_lookup("l3_emif_clkdm");
|
emif_clkdm = clkdm_lookup("l3_emif_clkdm");
|
||||||
l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
|
l3_1_clkdm = clkdm_lookup("l3_1_clkdm");
|
||||||
l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
|
l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
|
||||||
l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
|
l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
|
||||||
|
l4wkup = clkdm_lookup("l4_wkup_clkdm");
|
||||||
ducati_clkdm = clkdm_lookup("ducati_clkdm");
|
ducati_clkdm = clkdm_lookup("ducati_clkdm");
|
||||||
if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
|
if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) || (!l4wkup) ||
|
||||||
(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
|
(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
|
@ -183,6 +188,7 @@ static int __init omap4_pm_init(void)
|
||||||
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
|
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_1_clkdm);
|
||||||
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
|
ret |= clkdm_add_wkdep(mpuss_clkdm, l3_2_clkdm);
|
||||||
ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
|
ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
|
||||||
|
ret |= clkdm_add_wkdep(mpuss_clkdm, l4wkup);
|
||||||
ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
|
ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
|
||||||
ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
|
ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
|
|
@ -290,7 +290,7 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i <= irq_setup->nr_regs; i++) {
|
for (i = 0; i < irq_setup->nr_regs; i++) {
|
||||||
gc = irq_alloc_generic_chip("PRCM", 1,
|
gc = irq_alloc_generic_chip("PRCM", 1,
|
||||||
irq_setup->base_irq + i * 32, prm_base,
|
irq_setup->base_irq + i * 32, prm_base,
|
||||||
handle_level_irq);
|
handle_level_irq);
|
||||||
|
|
Loading…
Reference in New Issue