ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN
authorTony Lindgren <tony@atomide.com>
Thu, 18 Sep 2014 15:58:28 +0000 (08:58 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 18 Sep 2014 15:58:28 +0000 (08:58 -0700)
Commit cc824534d4fe ("ARM: OMAP2+: hwmod: Rearm wake-up interrupts
for DT when MUSB is idled") fixed issues with hung UART wake-up
events by calling _reconfigure_io_chain() when MUSB is connected
or disconnected.

As pointed out by Paul Walmsley, we may need to also call
_reconfigure_io_chain() in other cases, so it should be a separate
flag. Let's add HWMOD_RECONFIG_IO_CHAIN as suggested by Paul.

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

index 8fd87a3055bf6c4a084a25a51f19e4263567add7..e96808ef1adb7e05c4b5032d982e5bc88868ad73 100644 (file)
@@ -2185,7 +2185,7 @@ static int _enable(struct omap_hwmod *oh)
                         oh->mux->pads_dynamic))) {
                omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED);
                _reconfigure_io_chain();
-       } else if (oh->flags & HWMOD_FORCE_MSTANDBY) {
+       } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) {
                _reconfigure_io_chain();
        }
 
@@ -2293,7 +2293,7 @@ static int _idle(struct omap_hwmod *oh)
        if (oh->mux && oh->mux->pads_dynamic) {
                omap_hwmod_mux(oh->mux, _HWMOD_STATE_IDLE);
                _reconfigure_io_chain();
-       } else if (oh->flags & HWMOD_FORCE_MSTANDBY) {
+       } else if (oh->flags & HWMOD_RECONFIG_IO_CHAIN) {
                _reconfigure_io_chain();
        }
 
index 0f97d635ff90db413b27168fefeecf039a934159..512f809a3f4d1324c2f8a0a6661ac183d256240b 100644 (file)
@@ -514,6 +514,9 @@ struct omap_hwmod_omap4_prcm {
  * HWMOD_SWSUP_SIDLE_ACT: omap_hwmod code should manually bring the module
  *     out of idle, but rely on smart-idle to the put it back in idle,
  *     so the wakeups are still functional (Only known case for now is UART)
+ * HWMOD_RECONFIG_IO_CHAIN: omap_hwmod code needs to reconfigure wake-up 
+ *     events by calling _reconfigure_io_chain() when a device is enabled
+ *     or idled.
  */
 #define HWMOD_SWSUP_SIDLE                      (1 << 0)
 #define HWMOD_SWSUP_MSTANDBY                   (1 << 1)
@@ -528,6 +531,7 @@ struct omap_hwmod_omap4_prcm {
 #define HWMOD_BLOCK_WFI                                (1 << 10)
 #define HWMOD_FORCE_MSTANDBY                   (1 << 11)
 #define HWMOD_SWSUP_SIDLE_ACT                  (1 << 12)
+#define HWMOD_RECONFIG_IO_CHAIN                        (1 << 13)
 
 /*
  * omap_hwmod._int_flags definitions
index e9516b454e76c52c73910b21bfda7f7a2f973d1c..61cd49d26f6d884392009821368e63a06d6b0c0b 100644 (file)
@@ -1730,8 +1730,8 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
         * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
         * signal when MIDLEMODE is set to force-idle.
         */
-       .flags          = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
-                               | HWMOD_FORCE_MSTANDBY,
+       .flags          = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE |
+                         HWMOD_FORCE_MSTANDBY | HWMOD_RECONFIG_IO_CHAIN,
 };
 
 /* usb_otg_hs */