Skip to content

Commit

Permalink
Merge branch 'for_3.6/fixes/pm' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/khilman/linux-omap-pm into fixes
  • Loading branch information
Tony Lindgren committed Aug 11, 2012
2 parents 90f7f9a + 196449d commit cf835e8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 19 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/opp4xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int __init omap4_opp_init(void)
{
int r = -ENODEV;

if (!cpu_is_omap44xx())
if (!cpu_is_omap443x())
return r;

r = omap_init_opp_table(omap44xx_opp_def_list,
Expand Down
19 changes: 4 additions & 15 deletions arch/arm/mach-omap2/pm34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,21 +272,16 @@ void omap_sram_idle(void)
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);

if (mpu_next_state < PWRDM_POWER_ON) {
pwrdm_pre_transition(mpu_pwrdm);
pwrdm_pre_transition(neon_pwrdm);
}
pwrdm_pre_transition(NULL);

/* PER */
if (per_next_state < PWRDM_POWER_ON) {
pwrdm_pre_transition(per_pwrdm);
per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;
omap2_gpio_prepare_for_idle(per_going_off);
}

/* CORE */
if (core_next_state < PWRDM_POWER_ON) {
pwrdm_pre_transition(core_pwrdm);
if (core_next_state == PWRDM_POWER_OFF) {
omap3_core_save_context();
omap3_cm_save_context();
Expand Down Expand Up @@ -339,20 +334,14 @@ void omap_sram_idle(void)
omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,
OMAP3430_GR_MOD,
OMAP3_PRM_VOLTCTRL_OFFSET);
pwrdm_post_transition(core_pwrdm);
}
omap3_intc_resume_idle();

pwrdm_post_transition(NULL);

/* PER */
if (per_next_state < PWRDM_POWER_ON) {
if (per_next_state < PWRDM_POWER_ON)
omap2_gpio_resume_after_idle();
pwrdm_post_transition(per_pwrdm);
}

if (mpu_next_state < PWRDM_POWER_ON) {
pwrdm_post_transition(mpu_pwrdm);
pwrdm_post_transition(neon_pwrdm);
}
}

static void omap3_pm_idle(void)
Expand Down
8 changes: 6 additions & 2 deletions arch/arm/mach-omap2/sleep44xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ ppa_por_params:
* The restore function pointer is stored at CPUx_WAKEUP_NS_PA_ADDR_OFFSET.
* It returns to the caller for CPU INACTIVE and ON power states or in case
* CPU failed to transition to targeted OFF/DORMANT state.
*
* omap4_finish_suspend() calls v7_flush_dcache_all() which doesn't save
* stack frame and it expects the caller to take care of it. Hence the entire
* stack frame is saved to avoid possible stack corruption.
*/
ENTRY(omap4_finish_suspend)
stmfd sp!, {lr}
stmfd sp!, {r4-r12, lr}
cmp r0, #0x0
beq do_WFI @ No lowpower state, jump to WFI

Expand Down Expand Up @@ -226,7 +230,7 @@ scu_gp_clear:
skip_scu_gp_clear:
isb
dsb
ldmfd sp!, {pc}
ldmfd sp!, {r4-r12, pc}
ENDPROC(omap4_finish_suspend)

/*
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/twl-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void __init omap_pmic_init(int bus, u32 clkrate,
const char *pmic_type, int pmic_irq,
struct twl4030_platform_data *pmic_data)
{
omap_mux_init_signal("sys_nirq", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
strncpy(pmic_i2c_board_info.type, pmic_type,
sizeof(pmic_i2c_board_info.type));
pmic_i2c_board_info.irq = pmic_irq;
Expand Down
4 changes: 3 additions & 1 deletion drivers/cpufreq/omap-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)

policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);

if (atomic_inc_return(&freq_table_users) == 1)
if (!freq_table)
result = opp_init_cpufreq_table(mpu_dev, &freq_table);

if (result) {
Expand All @@ -227,6 +227,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
goto fail_ck;
}

atomic_inc_return(&freq_table_users);

result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
if (result)
goto fail_table;
Expand Down

0 comments on commit cf835e8

Please sign in to comment.