Commit ad0c63f1 authored by stanley.miao's avatar stanley.miao Committed by Tony Lindgren

OMAP3: AM3505/3517 do not have IO wakeup capability

AM3505/3517 doesn't have IO wakeup capability, so we do not need to set
the bit OMAP3430_EN_IO and the bit OMAP3430_EN_IO_CHAIN in the register
PM_WKEN_WKUP when the system enters suspend state.

Tested on AM3517EVM and OMAP3530EVM.
Signed-off-by: default avatarStanley.Miao <stanley.miao@windriver.com>
Acked-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 72a1179e
...@@ -179,6 +179,8 @@ static void __init omap3_check_features(void) ...@@ -179,6 +179,8 @@ static void __init omap3_check_features(void)
OMAP3_CHECK_FEATURE(status, ISP); OMAP3_CHECK_FEATURE(status, ISP);
if (cpu_is_omap3630()) if (cpu_is_omap3630())
omap3_features |= OMAP3_HAS_192MHZ_CLK; omap3_features |= OMAP3_HAS_192MHZ_CLK;
if (!cpu_is_omap3505() && !cpu_is_omap3517())
omap3_features |= OMAP3_HAS_IO_WAKEUP;
/* /*
* TODO: Get additional info (where applicable) * TODO: Get additional info (where applicable)
......
...@@ -385,8 +385,9 @@ void omap_sram_idle(void) ...@@ -385,8 +385,9 @@ void omap_sram_idle(void)
/* Enable IO-PAD and IO-CHAIN wakeups */ /* Enable IO-PAD and IO-CHAIN wakeups */
per_next_state = pwrdm_read_next_pwrst(per_pwrdm); per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
core_next_state = pwrdm_read_next_pwrst(core_pwrdm); core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
if (per_next_state < PWRDM_POWER_ON || if (omap3_has_io_wakeup() && \
core_next_state < PWRDM_POWER_ON) { (per_next_state < PWRDM_POWER_ON ||
core_next_state < PWRDM_POWER_ON)) {
prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
omap3_enable_io_chain(); omap3_enable_io_chain();
} }
...@@ -479,7 +480,7 @@ void omap_sram_idle(void) ...@@ -479,7 +480,7 @@ void omap_sram_idle(void)
} }
/* Disable IO-PAD and IO-CHAIN wakeup */ /* Disable IO-PAD and IO-CHAIN wakeup */
if (core_next_state < PWRDM_POWER_ON) { if (omap3_has_io_wakeup() && core_next_state < PWRDM_POWER_ON) {
prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
omap3_disable_io_chain(); omap3_disable_io_chain();
} }
......
...@@ -444,6 +444,7 @@ extern u32 omap3_features; ...@@ -444,6 +444,7 @@ extern u32 omap3_features;
#define OMAP3_HAS_NEON BIT(3) #define OMAP3_HAS_NEON BIT(3)
#define OMAP3_HAS_ISP BIT(4) #define OMAP3_HAS_ISP BIT(4)
#define OMAP3_HAS_192MHZ_CLK BIT(5) #define OMAP3_HAS_192MHZ_CLK BIT(5)
#define OMAP3_HAS_IO_WAKEUP BIT(6)
#define OMAP3_HAS_FEATURE(feat,flag) \ #define OMAP3_HAS_FEATURE(feat,flag) \
static inline unsigned int omap3_has_ ##feat(void) \ static inline unsigned int omap3_has_ ##feat(void) \
...@@ -457,5 +458,6 @@ OMAP3_HAS_FEATURE(iva, IVA) ...@@ -457,5 +458,6 @@ OMAP3_HAS_FEATURE(iva, IVA)
OMAP3_HAS_FEATURE(neon, NEON) OMAP3_HAS_FEATURE(neon, NEON)
OMAP3_HAS_FEATURE(isp, ISP) OMAP3_HAS_FEATURE(isp, ISP)
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment