Skip to contentSkip to conversation

imx53-qsb: Convert to watchdog driver model

PATCH Applied Fabio Estevam 2 participants 3 messages Feb 21, 2024 – Feb 24, 2024

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 imx53-qsb: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset.

---
 arch/arm/dts/imx53-qsb-u-boot.dtsi | 14 ++++++++++++++
 configs/mx53loco_defconfig         |  3 +++
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/dts/imx53-qsb-u-boot.dtsi
arch/arm/dts/imx53-qsb-u-boot.dtsi new file +14 -0
new file mode 100644
index 000000000000..593ab7caa635
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+	wdt-reboot {
+		compatible = "wdt-reboot";
+		wdt = <&wdog1>;
+		bootph-pre-ram;
+	};
+};
+
+&wdog1 {
+	bootph-pre-ram;
+};
+
configs/mx53loco_defconfig +3 -0
index d4de8df7b49d..e2d3bc0b094e 100644
@@ -60,6 +60,8 @@ CONFIG_POWER_FSL=y
 CONFIG_POWER_I2C=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_MX5=y
 CONFIG_USB_STORAGE=y
@@ -67,3 +69,4 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_IMX_WATCHDOG=y
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

________________________________
From: Fabio Estevam <[email protected]>
Sent: Thursday, February 22, 2024 1:39 AM
To: [email protected] <[email protected]>
Cc: Jason Liu <[email protected]>; [email protected] <[email protected]>; Fabio Estevam <[email protected]>
Subject: [PATCH] imx53-qsb: Convert to watchdog driver model

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset.

---
 arch/arm/dts/imx53-qsb-u-boot.dtsi | 14 ++++++++++++++
 configs/mx53loco_defconfig         |  3 +++
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/dts/imx53-qsb-u-boot.dtsi

Thx for the fix.

arch/arm/dts/imx53-qsb-u-boot.dtsi new file +14 -0
new file mode 100644
index 000000000000..593ab7caa635
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+       wdt-reboot {
+               compatible = "wdt-reboot";
+               wdt = <&wdog1>;
+               bootph-pre-ram;
+       };
+};
+
+&wdog1 {
+       bootph-pre-ram;
+};
+
configs/mx53loco_defconfig +3 -0
index d4de8df7b49d..e2d3bc0b094e 100644
@@ -60,6 +60,8 @@ CONFIG_POWER_FSL=y
 CONFIG_POWER_I2C=y
 CONFIG_DM_SERIAL=y
 CONFIG_MXC_UART=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_MX5=y
 CONFIG_USB_STORAGE=y
@@ -67,3 +69,4 @@ CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_USB_ETHER_MCS7830=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_IMX_WATCHDOG=y

--
2.34.1

author reviewer Applied
#2 lore raw
In reply to Fabio Estevam
Quoted 8 lines · Fabio Estevam

Commit 68dcbdd594d4 ("ARM: imx: Add weak default reset_cpu()") caused the 'reset' command in U-Boot to not cause a board reset.

Fix it by switching to the watchdog driver model via sysreset, which is the preferred method for implementing the watchdog reset.

Applied, thanks.