linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/12] ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN
@ 2014-09-16  3:11 Tony Lindgren
  2014-09-16  3:11 ` [PATCH 02/12] ARM: OMAP3: Use force-idle for UARTs because of DMA errata Tony Lindgren
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Tony Lindgren @ 2014-09-16  3:11 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod.c           | 4 ++--
 arch/arm/mach-omap2/omap_hwmod.h           | 4 ++++
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 4 ++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 9e91a4e..bd9990e 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -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();
 	}
 
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 0f97d63..512f809 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -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
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index e9516b4..61cd49d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -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 */
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-09-18 16:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16  3:11 [PATCH 01/12] ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN Tony Lindgren
2014-09-16  3:11 ` [PATCH 02/12] ARM: OMAP3: Use force-idle for UARTs because of DMA errata Tony Lindgren
2014-09-16 17:00   ` Paul Walmsley
2014-09-16 17:44     ` Tony Lindgren
2014-09-17 16:46       ` Paul Walmsley
2014-09-16  3:11 ` [PATCH 03/12] ARM: dts: omap3-overo: Fix UART wake-up events Tony Lindgren
2014-09-16  3:11 ` [PATCH 04/12] ARM: dts: omap: Remove WAKEUPENABLE mux options for UARTs Tony Lindgren
2014-09-16  3:11 ` [PATCH 05/12] ARM: dts: Do not set pulls for I2C lines Tony Lindgren
2014-09-16  3:12 ` [PATCH 06/12] ARM: dts: Add support for Ethernet on some N900 macro boards Tony Lindgren
2014-09-16  3:12 ` [PATCH 07/12] ARM: dts: Enable PMIC idle configuration for LDP Tony Lindgren
2014-09-16  3:12 ` [PATCH 08/12] ARM: omap2plus_defconfig: Shrink with savedefconfig Tony Lindgren
2014-09-16  4:56   ` Felipe Balbi
2014-09-18 15:57     ` Tony Lindgren
2014-09-18 16:03       ` Felipe Balbi
2014-09-16  3:12 ` [PATCH 09/12] ARM: omap2plus_defconfig: Add cpufreq to defconfig Tony Lindgren
2014-09-18 16:11   ` Nishanth Menon
2014-09-18 16:20     ` Tony Lindgren
2014-09-18 16:23       ` Nishanth Menon
2014-09-16  3:12 ` [PATCH 10/12] ARM: omap2plus_defconfig: Add support for distros with systemd Tony Lindgren
2014-09-18  7:01   ` Javier Martinez Canillas
2014-09-16  3:12 ` [PATCH 11/12] ARM: omap2plus_defconfig: Enable battery and reset drivers Tony Lindgren
2014-09-16  3:12 ` [PATCH 12/12] ARM: omap2plus_defconfig: Enable some display features Tony Lindgren
2014-09-16 16:04 ` [PATCH 01/12] ARM: OMAP2+: Add hwmod flag for HWMOD_RECONFIG_IO_CHAIN Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).