diff mbox

ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen

Message ID 20171117165658.21003-1-tony@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren Nov. 17, 2017, 4:56 p.m. UTC
There's been a reproducable USB OHCI/EHCI cpuidle related hang on omap4
for a while that happens after about 20 - 40 minutes on an idle system
with some data feeding device being connected, like a USB GPS device or
a cellular modem.

This issue happens in cpuidle states C2 and C3 and does not happen if
cpuidle is limited to C1 state only. The symptoms are that the whole
system hangs and never wakes up from idle, and if a watchdog is
configured the system reboots after a while.

Turns out that OHCI/EHCI devices on omap4 are trying to use the GIC
interrupt controller directly as a parent instead of the WUGEN. We
need to pass the interrupts through WUGEN to GIC to provide the wakeup
events for the processor.

Let's fix the issue by removing the gic interrupt-parent and use the
default interrupt-parent wakeupgen instead. Note that omap5.dtsi had
this already fixes earlier by commit 7136d457f365 ("ARM: omap: convert
wakeupgen to stacked domains") but we somehow missed omap4 at that
point.

Fixes: 7136d457f365 ("ARM: omap: convert wakeupgen to stacked domains")
Cc: Dave Gerlach <d-gerlach@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/omap4.dtsi | 2 --
 1 file changed, 2 deletions(-)

Comments

Tony Lindgren Nov. 17, 2017, 5 p.m. UTC | #1
Adding Tero to Cc also.

* Tony Lindgren <tony@atomide.com> [171117 16:59]:
> There's been a reproducable USB OHCI/EHCI cpuidle related hang on omap4
> for a while that happens after about 20 - 40 minutes on an idle system
> with some data feeding device being connected, like a USB GPS device or
> a cellular modem.
> 
> This issue happens in cpuidle states C2 and C3 and does not happen if
> cpuidle is limited to C1 state only. The symptoms are that the whole
> system hangs and never wakes up from idle, and if a watchdog is
> configured the system reboots after a while.
> 
> Turns out that OHCI/EHCI devices on omap4 are trying to use the GIC
> interrupt controller directly as a parent instead of the WUGEN. We
> need to pass the interrupts through WUGEN to GIC to provide the wakeup
> events for the processor.
> 
> Let's fix the issue by removing the gic interrupt-parent and use the
> default interrupt-parent wakeupgen instead. Note that omap5.dtsi had
> this already fixes earlier by commit 7136d457f365 ("ARM: omap: convert
> wakeupgen to stacked domains") but we somehow missed omap4 at that
> point.
> 
> Fixes: 7136d457f365 ("ARM: omap: convert wakeupgen to stacked domains")
> Cc: Dave Gerlach <d-gerlach@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/boot/dts/omap4.dtsi | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -1081,14 +1081,12 @@
>  			usbhsohci: ohci@4a064800 {
>  				compatible = "ti,ohci-omap3";
>  				reg = <0x4a064800 0x400>;
> -				interrupt-parent = <&gic>;
>  				interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
>  			};
>  
>  			usbhsehci: ehci@4a064c00 {
>  				compatible = "ti,ehci-omap";
>  				reg = <0x4a064c00 0x400>;
> -				interrupt-parent = <&gic>;
>  				interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
>  			};
>  		};
> -- 
> 2.15.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roger Quadros Nov. 20, 2017, 8:44 a.m. UTC | #2
On 17/11/17 18:56, Tony Lindgren wrote:
> There's been a reproducable USB OHCI/EHCI cpuidle related hang on omap4
> for a while that happens after about 20 - 40 minutes on an idle system
> with some data feeding device being connected, like a USB GPS device or
> a cellular modem.
> 
> This issue happens in cpuidle states C2 and C3 and does not happen if
> cpuidle is limited to C1 state only. The symptoms are that the whole
> system hangs and never wakes up from idle, and if a watchdog is
> configured the system reboots after a while.
> 
> Turns out that OHCI/EHCI devices on omap4 are trying to use the GIC
> interrupt controller directly as a parent instead of the WUGEN. We
> need to pass the interrupts through WUGEN to GIC to provide the wakeup
> events for the processor.
> 
> Let's fix the issue by removing the gic interrupt-parent and use the
> default interrupt-parent wakeupgen instead. Note that omap5.dtsi had
> this already fixes earlier by commit 7136d457f365 ("ARM: omap: convert
> wakeupgen to stacked domains") but we somehow missed omap4 at that
> point.
> 
> Fixes: 7136d457f365 ("ARM: omap: convert wakeupgen to stacked domains")
> Cc: Dave Gerlach <d-gerlach@ti.com>
> Cc: Nishanth Menon <nm@ti.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Reviewed-by: Roger Quadros <rogerq@ti.com>

> ---
>  arch/arm/boot/dts/omap4.dtsi | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
> --- a/arch/arm/boot/dts/omap4.dtsi
> +++ b/arch/arm/boot/dts/omap4.dtsi
> @@ -1081,14 +1081,12 @@
>  			usbhsohci: ohci@4a064800 {
>  				compatible = "ti,ohci-omap3";
>  				reg = <0x4a064800 0x400>;
> -				interrupt-parent = <&gic>;
>  				interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
>  			};
>  
>  			usbhsehci: ehci@4a064c00 {
>  				compatible = "ti,ehci-omap";
>  				reg = <0x4a064c00 0x400>;
> -				interrupt-parent = <&gic>;
>  				interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
>  			};
>  		};
>
diff mbox

Patch

diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -1081,14 +1081,12 @@ 
 			usbhsohci: ohci@4a064800 {
 				compatible = "ti,ohci-omap3";
 				reg = <0x4a064800 0x400>;
-				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
 			usbhsehci: ehci@4a064c00 {
 				compatible = "ti,ehci-omap";
 				reg = <0x4a064c00 0x400>;
-				interrupt-parent = <&gic>;
 				interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
 			};
 		};