IO Daisychain has to be enabled only if the corresponding omap has
io chain wake up capability.

Signed-off-by: Vishwanath BS <[email protected]>
Tested-by: Govindraj.R <[email protected]>
---
 arch/arm/mach-omap2/prm2xxx_3xxx.c |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c 
b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 688e74c..712ce02 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -238,18 +238,20 @@ void omap3_trigger_wuclk_ctrl(void)
 {
        int i = 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);
-
-       omap_test_timeout(
-       (((omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
-                OMAP3430_ST_IO_CHAIN_MASK) == 1)),
-       MAX_IOPAD_LATCH_TIME, i);
-
-       omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
-                            PM_WKEN);
+       if (omap3_has_io_chain_ctrl()) {
+               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);
+
+               omap_test_timeout(
+               (((omap2_prm_read_mod_reg(WKUP_MOD, PM_WKST) &
+                        OMAP3430_ST_IO_CHAIN_MASK) == 1)),
+               MAX_IOPAD_LATCH_TIME, i);
+
+               omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, 
WKUP_MOD,
+                                    PM_WKEN);
+       }
 }
 
 static int __init omap3xxx_prcm_init(void)
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to