diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 6d7f0d8a3103..9d6cb7cc94ab 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -72,34 +72,6 @@ static struct powerdomain *mpu_pwrdm, *neon_pwrdm; | |||
72 | static struct powerdomain *core_pwrdm, *per_pwrdm; | 72 | static struct powerdomain *core_pwrdm, *per_pwrdm; |
73 | static struct powerdomain *cam_pwrdm; | 73 | static struct powerdomain *cam_pwrdm; |
74 | 74 | ||
75 | static void omap3_enable_io_chain(void) | ||
76 | { | ||
77 | int timeout = 0; | ||
78 | |||
79 | omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD, | ||
80 | PM_WKEN); | ||
81 | /* Do a readback to assure write has been done */ | ||
82 | omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN); | ||
83 | |||
84 | while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) & | ||
85 | OMAP3430_ST_IO_CHAIN_MASK)) { | ||
86 | timeout++; | ||
87 | if (timeout > 1000) { | ||
88 | pr_err("Wake up daisy chain activation failed.\n"); | ||
89 | return; | ||
90 | } | ||
91 | } | ||
92 | omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD, | ||
93 | PM_WKEN); | ||
94 | |||
95 | } | ||
96 | |||
97 | static void omap3_disable_io_chain(void) | ||
98 | { | ||
99 | omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD, | ||
100 | PM_WKEN); | ||
101 | } | ||
102 | |||
103 | static void omap3_core_save_context(void) | 75 | static void omap3_core_save_context(void) |
104 | { | 76 | { |
105 | omap3_ctrl_save_padconf(); | 77 | omap3_ctrl_save_padconf(); |
@@ -305,7 +277,7 @@ void omap_sram_idle(void) | |||
305 | core_next_state < PWRDM_POWER_ON)) { | 277 | core_next_state < PWRDM_POWER_ON)) { |
306 | omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); | 278 | omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); |
307 | if (omap3_has_io_chain_ctrl()) | 279 | if (omap3_has_io_chain_ctrl()) |
308 | omap3_enable_io_chain(); | 280 | omap3xxx_prm_reconfigure_io_chain(); |
309 | } | 281 | } |
310 | 282 | ||
311 | pwrdm_pre_transition(); | 283 | pwrdm_pre_transition(); |
@@ -382,12 +354,9 @@ void omap_sram_idle(void) | |||
382 | /* Disable IO-PAD and IO-CHAIN wakeup */ | 354 | /* Disable IO-PAD and IO-CHAIN wakeup */ |
383 | if (omap3_has_io_wakeup() && | 355 | if (omap3_has_io_wakeup() && |
384 | (per_next_state < PWRDM_POWER_ON || | 356 | (per_next_state < PWRDM_POWER_ON || |
385 | core_next_state < PWRDM_POWER_ON)) { | 357 | core_next_state < PWRDM_POWER_ON)) |
386 | omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, | 358 | omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, |
387 | PM_WKEN); | 359 | PM_WKEN); |
388 | if (omap3_has_io_chain_ctrl()) | ||
389 | omap3_disable_io_chain(); | ||
390 | } | ||
391 | 360 | ||
392 | clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); | 361 | clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); |
393 | } | 362 | } |