Merge tag 'omap-devel-c-for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into devel-pm
Reimplement the OMAP PRCM I/O chain code. Needed for I/O wakeups to work correctly. Conflicts: arch/arm/mach-omap2/prm2xxx_3xxx.c
This commit is contained in:
@@ -72,33 +72,6 @@ static struct powerdomain *mpu_pwrdm, *neon_pwrdm;
|
||||
static struct powerdomain *core_pwrdm, *per_pwrdm;
|
||||
static struct powerdomain *cam_pwrdm;
|
||||
|
||||
static void omap3_enable_io_chain(void)
|
||||
{
|
||||
int timeout = 0;
|
||||
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
|
||||
PM_WKEN);
|
||||
/* Do a readback to assure write has been done */
|
||||
omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
|
||||
|
||||
while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
|
||||
OMAP3430_ST_IO_CHAIN_MASK)) {
|
||||
timeout++;
|
||||
if (timeout > 1000) {
|
||||
pr_err("Wake up daisy chain activation failed.\n");
|
||||
return;
|
||||
}
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
|
||||
WKUP_MOD, PM_WKEN);
|
||||
}
|
||||
}
|
||||
|
||||
static void omap3_disable_io_chain(void)
|
||||
{
|
||||
omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
|
||||
PM_WKEN);
|
||||
}
|
||||
|
||||
static void omap3_core_save_context(void)
|
||||
{
|
||||
omap3_ctrl_save_padconf();
|
||||
@@ -299,13 +272,6 @@ void omap_sram_idle(void)
|
||||
/* Enable IO-PAD and IO-CHAIN wakeups */
|
||||
per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
|
||||
core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
|
||||
if (omap3_has_io_wakeup() &&
|
||||
(per_next_state < PWRDM_POWER_ON ||
|
||||
core_next_state < PWRDM_POWER_ON)) {
|
||||
omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
|
||||
if (omap3_has_io_chain_ctrl())
|
||||
omap3_enable_io_chain();
|
||||
}
|
||||
|
||||
pwrdm_pre_transition();
|
||||
|
||||
@@ -378,16 +344,6 @@ void omap_sram_idle(void)
|
||||
if (per_next_state < PWRDM_POWER_ON)
|
||||
omap2_gpio_resume_after_idle();
|
||||
|
||||
/* Disable IO-PAD and IO-CHAIN wakeup */
|
||||
if (omap3_has_io_wakeup() &&
|
||||
(per_next_state < PWRDM_POWER_ON ||
|
||||
core_next_state < PWRDM_POWER_ON)) {
|
||||
omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
|
||||
PM_WKEN);
|
||||
if (omap3_has_io_chain_ctrl())
|
||||
omap3_disable_io_chain();
|
||||
}
|
||||
|
||||
clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user