]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: socfpga: Use DM watchdog timer
authorChee Hong Ang <chee.hong.ang@intel.com>
Thu, 6 Aug 2020 04:15:33 +0000 (12:15 +0800)
committerLey Foon Tan <ley.foon.tan@intel.com>
Fri, 9 Oct 2020 09:53:12 +0000 (17:53 +0800)
All SoCFPGA platforms (except Cyclone V) are now switching
to CONFIG_WDT (driver model for watchdog timer drivers)
from CONFIG_HW_WATCHDOG.

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
arch/arm/dts/socfpga_agilex_socdk-u-boot.dtsi
arch/arm/dts/socfpga_arria10_socdk-u-boot.dtsi
arch/arm/dts/socfpga_stratix10.dtsi
arch/arm/dts/socfpga_stratix10_socdk-u-boot.dtsi
arch/arm/mach-socfpga/spl_agilex.c
arch/arm/mach-socfpga/spl_s10.c
configs/socfpga_agilex_defconfig

index debeb8b239a98b28282ad566d9e7adcbeb6829c2..6cac36a1fc95f74ad8aa4c3597bee92b61daace2 100644 (file)
@@ -40,3 +40,7 @@
 &qspi {
        status = "okay";
 };
+
+&watchdog0 {
+       u-boot,dm-pre-reloc;
+};
index 58cd4978216538493225337b0921fd1d1879f7dc..22e614d04ca17fb33f7a9a33ad8ca8aba6064cc6 100644 (file)
@@ -15,3 +15,7 @@
 &uart1 {
        u-boot,dm-pre-reloc;
 };
+
+&watchdog1 {
+        u-boot,dm-pre-reloc;
+};
index a8e61cf7280a3b24f969facd9767002eebfd9c2f..cb799bc5512997b2fc52217f9f87efb8087f4518 100755 (executable)
                        reg = <0xffd00200 0x100>;
                        interrupts = <0 117 4>;
                        resets = <&rst WATCHDOG0_RESET>;
-                       u-boot,dm-pre-reloc;
                        status = "disabled";
                };
 
index a903040d604fd9bcc60c496f2045bf880954fee1..2669abb3832cf3a282dbb7b2372d6c62e30dfde6 100755 (executable)
@@ -33,5 +33,6 @@
 };
 
 &watchdog0 {
+       status = "okay";
        u-boot,dm-pre-reloc;
 };
index 0121ff431f96bbd0a051fe06bd83b402de272895..78b5d7c8d987617340cc3eb48cf9b55990a7ad02 100644 (file)
@@ -51,11 +51,11 @@ void board_init_f(ulong dummy)
 
        socfpga_get_managers_addr();
 
-#ifdef CONFIG_HW_WATCHDOG
        /* Ensure watchdog is paused when debugging is happening */
        writel(SYSMGR_WDDBG_PAUSE_ALL_CPU,
               socfpga_get_sysmgr_addr() + SYSMGR_SOC64_WDDBG);
 
+#ifdef CONFIG_HW_WATCHDOG
        /* Enable watchdog before initializing the HW */
        socfpga_per_reset(SOCFPGA_RESET(L4WD0), 1);
        socfpga_per_reset(SOCFPGA_RESET(L4WD0), 0);
index 1f7118226c5256fcf774c9cdd142a2d259c3d9e4..daed05653ad11f4a02f4076045234375a7c3ccfc 100644 (file)
@@ -53,11 +53,11 @@ void board_init_f(ulong dummy)
 
        socfpga_get_managers_addr();
 
-#ifdef CONFIG_HW_WATCHDOG
        /* Ensure watchdog is paused when debugging is happening */
        writel(SYSMGR_WDDBG_PAUSE_ALL_CPU,
               socfpga_get_sysmgr_addr() + SYSMGR_SOC64_WDDBG);
 
+#ifdef CONFIG_HW_WATCHDOG
        /* Enable watchdog before initializing the HW */
        socfpga_per_reset(SOCFPGA_RESET(L4WD0), 1);
        socfpga_per_reset(SOCFPGA_RESET(L4WD0), 0);
index ee1a665605cb91aa400bc55c9e7d14d2fb45a23c..c4db1d0835ff0d398d2ff08a546c93984eea511c 100644 (file)
@@ -60,5 +60,7 @@ CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_DWC2=y
 CONFIG_USB_STORAGE=y
+CONFIG_DESIGNWARE_WATCHDOG=y
+CONFIG_WDT=y
 # CONFIG_SPL_USE_TINY_PRINTF is not set
 CONFIG_PANIC_HANG=y