]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mx7dsabresd: Convert to watchdog driver model
authorFabio Estevam <festevam@denx.de>
Tue, 8 Aug 2023 21:40:39 +0000 (18:40 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 16 Oct 2023 14:25:10 +0000 (16:25 +0200)
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.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
arch/arm/dts/imx7d-sdb-u-boot.dtsi
configs/mx7dsabresd_defconfig

index b5777304230c59ed304ee933e01e9f0375d53b20..71bfd80aab830cd8e4543779cf09e86487f034e4 100644 (file)
@@ -2,6 +2,14 @@
 
 #include "imx7s-u-boot.dtsi"
 
+/ {
+       wdt-reboot {
+               compatible = "wdt-reboot";
+               wdt = <&wdog1>;
+               bootph-pre-ram;
+       };
+};
+
 &fec2 {
        status = "disable";
 };
@@ -60,3 +68,7 @@
                >;
        };
 };
+
+&wdog1 {
+       bootph-pre-ram;
+};
index 26e68d30d267805d4948efa2a582212dd78e2621..1c8105f44f2808346d70f961188ba700b9a2b1de 100644 (file)
@@ -73,6 +73,8 @@ CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_DM_SPI=y
 CONFIG_SOFT_SPI=y
+CONFIG_SYSRESET=y
+CONFIG_SYSRESET_WATCHDOG=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
@@ -85,4 +87,5 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_IMX_WATCHDOG=y
 CONFIG_ERRNO_STR=y