[v2,1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered

Message ID 20231106144335.v2.1.Ic7577567baff921347d423b722de8b857602efb1@changeid
State New
Headers
Series [v2,1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered |

Commit Message

Doug Anderson Nov. 6, 2023, 10:43 p.m. UTC
  On sc7180 when the watchdog timer fires your logs get filled with:
  watchdog0: pretimeout event
  watchdog0: pretimeout event
  watchdog0: pretimeout event
  ...
  watchdog0: pretimeout event

If you're using console-ramoops to debug crashes the above gets quite
annoying since it blows away any other log messages that might have
been there.

The issue is that the "bark" interrupt (AKA the "pretimeout"
interrupt) remains high until the watchdog is pet. Since we've got
things configured as "level" triggered we'll keep getting interrupted
over and over.

Let's switch to edge triggered. Now we'll get one interrupt when the
"bark" interrupt goes off and won't get another one until the "bark"
interrupt is cleared and asserts again.

This matches how many older Qualcomm SoCs have things configured.

Fixes: 28cc13e4060c ("arm64: dts: qcom: sc7180: Add watchdog bark interrupt")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

Changes in v2:
- Fixed typo in commit message.

 arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bjorn Andersson Dec. 8, 2023, 2:57 a.m. UTC | #1
On Mon, 06 Nov 2023 14:43:28 -0800, Douglas Anderson wrote:
> On sc7180 when the watchdog timer fires your logs get filled with:
>   watchdog0: pretimeout event
>   watchdog0: pretimeout event
>   watchdog0: pretimeout event
>   ...
>   watchdog0: pretimeout event
> 
> [...]

Applied, thanks!

[1/9] arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered
      commit: 7ac90b4cf107a3999b30844d7899e0331686b33b
[2/9] arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered
      commit: 6897fac411db7b43243f67d4fd4d3f95abf7f656
[3/9] arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered
      commit: 263b348499454f38d36b9442c3cf9279c571bb54
[4/9] arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered
      commit: 9204e9a4099212c850e1703c374ef4538080825b
[5/9] arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered
      commit: 735d80e2e8e5d073ae8b1fff8b1589ea284aa5af
[6/9] arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered
      commit: 48d5cf4772ec6268853158d9ffc54612e988ebe6
[7/9] arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered
      commit: 6c4a9c7ea486da490400c84ba2768c90d228c283
[8/9] arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered
      commit: 5b84bb2b8d86595544fc8272364b0f1a34b68a4f

Best regards,
  

Patch

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 11f353d416b4..c0365832c315 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -3576,7 +3576,7 @@  watchdog@17c10000 {
 			compatible = "qcom,apss-wdt-sc7180", "qcom,kpss-wdt";
 			reg = <0 0x17c10000 0 0x1000>;
 			clocks = <&sleep_clk>;
-			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_EDGE_RISING>;
 		};
 
 		timer@17c20000 {