Skip to contentSkip to conversation

watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

PATCH Superseded Heiko Schocher 4 participants 5 messages Jun 12, 2019 – Aug 26, 2019

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.

---

Patchseries build fine on travis see:
https://travis-ci.org/hsdenx/u-boot-test/builds/544546490

Based on mainline commit:
68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

and wdt imx patches from Marek:
http://patchwork.ozlabs.org/patch/1112591/
http://patchwork.ozlabs.org/patch/1112592/

 arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 -
 configs/dh_imx6_defconfig                          | 1 +
 configs/display5_defconfig                         | 1 +
 configs/display5_factory_defconfig                 | 1 +
 configs/ge_bx50v3_defconfig                        | 1 +
 configs/kp_imx6q_tpc_defconfig                     | 1 +
 configs/m53menlo_defconfig                         | 1 +
 configs/mx53ppd_defconfig                          | 1 +
 configs/tqma6s_wru4_mmc_defconfig                  | 1 +
 configs/warp_defconfig                             | 1 +
 drivers/watchdog/Kconfig                           | 9 +++++++++
 include/configs/MPC8349ITX.h                       | 6 ------
 include/configs/MPC837XERDB.h                      | 5 -----
 include/configs/dh_imx6.h                          | 1 -
 include/configs/display5.h                         | 1 -
 include/configs/ge_bx50v3.h                        | 2 --
 include/configs/kp_imx6q_tpc.h                     | 1 -
 include/configs/m53menlo.h                         | 1 -
 include/configs/mx53ppd.h                          | 2 --
 include/configs/socfpga_common.h                   | 1 -
 include/configs/socfpga_stratix10_socdk.h          | 1 -
 include/configs/tqma6_wru4.h                       | 1 -
 include/configs/warp.h                             | 1 -
 include/wdt.h                                      | 3 ---
 scripts/config_whitelist.txt                       | 1 -
 25 files changed, 18 insertions(+), 28 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +0 -1
index 9583bf743e..d7f7b9f111 100644
@@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG.
 Use following config to set watchdog timeout, if this config is not defined,
 the default timeout value is 128s which is the maximum. Set 10 seconds for
 example:
-    #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000
 Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that the
 watchdog will not be fed in u-boot.
configs/dh_imx6_defconfig +1 -0
index d9ec5c7c5e..c3ef829553 100644
@@ -62,5 +62,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/display5_defconfig +1 -0
index 3b793f4500..1c52441802 100644
@@ -79,4 +79,5 @@ CONFIG_MII=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
configs/display5_factory_defconfig +1 -0
index 0d9eed3a3e..1df7461a21 100644
@@ -86,5 +86,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/ge_bx50v3_defconfig +1 -0
index 8be881b939..cc056dc681 100644
@@ -60,5 +60,6 @@ CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
configs/kp_imx6q_tpc_defconfig +1 -0
index 0ca83cbfea..7e9d2fc747 100644
@@ -40,5 +40,6 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/m53menlo_defconfig +1 -0
index 0e5fa01fde..6be311bf35 100644
@@ -69,6 +69,7 @@ CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
configs/mx53ppd_defconfig +1 -0
index 19ebab78e9..8c8e9a28ed 100644
@@ -49,4 +49,5 @@ CONFIG_USB_EHCI_MX5=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
configs/tqma6s_wru4_mmc_defconfig +1 -0
index 57f2221c78..ea29fa967b 100644
@@ -66,5 +66,6 @@ CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/warp_defconfig +1 -0
index a37d769296..e033cc9d8c 100644
@@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
drivers/watchdog/Kconfig +9 -0
index 5993865647..9784a998c4 100644
@@ -8,6 +8,15 @@ config WATCHDOG
 	  this option if you want to service enabled watchdog by U-Boot. Disable
 	  this option if you want U-Boot to start watchdog but never service it.
 
+config WATCHDOG_TIMEOUT_MSECS
+	int "Watchdog timeout in msec"
+	default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 || ARCH_MX6
+	default 128000 if ARCH_MX7 || ARCH_VF610
+	default 30000 if ARCH_SOCFPGA
+	default 60000
+	help
+	  Watchdog timeout in msec
+
 config HW_WATCHDOG
 	bool
 
include/configs/MPC8349ITX.h +0 -6
index a3f704c73b..c395d62379 100644
@@ -209,12 +209,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #define CONFIG_SYS_VSC7385_BASE	0xF8000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
-
 #define CONFIG_SYS_LED_BASE	0xF9000000
 
 
include/configs/MPC837XERDB.h +0 -5
index 13a7682958..37f51ba743 100644
@@ -186,11 +186,6 @@
 
 #define CONFIG_SYS_VSC7385_BASE	0xF0000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
 /*
  * Serial Port
  */
include/configs/dh_imx6.h +0 -1
index 3eee382a64..54b61a0a06 100644
@@ -98,7 +98,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/display5.h +0 -1
index 8829cbad91..9d7cb270a8 100644
@@ -361,7 +361,6 @@
 /* Commands */
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
 
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/ge_bx50v3.h +0 -2
index 0481ed06a9..4bc2a8878b 100644
@@ -28,8 +28,6 @@
 #define CONFIG_REVISION_TAG
 #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000
-
 #define CONFIG_MXC_UART
 
 /* SATA Configs */
include/configs/kp_imx6q_tpc.h +0 -1
index d2ebf92953..4d075b47f6 100644
@@ -62,7 +62,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/m53menlo.h +0 -1
index fc0b1f480c..ff6354904b 100644
@@ -156,7 +156,6 @@
 #define CONFIG_FSL_IIM
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
 /*
  * Boot Linux
include/configs/mx53ppd.h +0 -2
index 2d6715cba2..2944415d7f 100644
@@ -22,8 +22,6 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
-
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_REVISION_TAG
 
include/configs/socfpga_common.h +0 -1
index d1034ac280..d6a7caee19 100644
@@ -108,7 +108,6 @@
 #define CONFIG_DESIGNWARE_WATCHDOG
 #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
 #define CONFIG_DW_WDT_CLOCK_KHZ		25000
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	30000
 #endif
 
 /*
include/configs/socfpga_stratix10_socdk.h +0 -1
index 8d2971c6e2..27f87e75df 100644
@@ -167,7 +167,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 unsigned int cm_get_l4_sys_free_clk_hz(void);
 #define CONFIG_DW_WDT_CLOCK_KHZ		(cm_get_l4_sys_free_clk_hz() / 1000)
 #endif
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	3000
 #endif
 
 /*
include/configs/tqma6_wru4.h +0 -1
index 34f000f214..0af52e5565 100644
@@ -17,7 +17,6 @@
 #define CONSOLE_DEV		"ttymxc3"
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* Config on-board RTC */
 #define CONFIG_RTC_DS1337
include/configs/warp.h +0 -1
index 5345f5314d..41fd6c759e 100644
@@ -25,7 +25,6 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
 
 #define CONFIG_SYS_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + SZ_256M)
include/wdt.h +0 -3
index 5bcff24ab3..e833d3a772 100644
@@ -107,9 +107,6 @@ struct wdt_ops {
 };
 
 #if CONFIG_IS_ENABLED(WDT)
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
-#endif
 #define WATCHDOG_TIMEOUT_SECS	(CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)
 
 static inline int initr_watchdog(void)
scripts/config_whitelist.txt +0 -1
index 8651d569c5..921dc5290c 100644
@@ -4451,7 +4451,6 @@ CONFIG_WATCHDOG_NOWAYOUT
 CONFIG_WATCHDOG_PRESC
 CONFIG_WATCHDOG_RC
 CONFIG_WATCHDOG_TIMEOUT
-CONFIG_WATCHDOG_TIMEOUT_MSECS
 CONFIG_WD_PERIOD
 CONFIG_X600
 CONFIG_X86EMU_DEBUG
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

Quoted 4 lines · Heiko Schocher

move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.

Thanks,
Stefan

Quoted 343 lines

---

Patchseries build fine on travis see:
https://travis-ci.org/hsdenx/u-boot-test/builds/544546490

Based on mainline commit:
68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

and wdt imx patches from Marek:
http://patchwork.ozlabs.org/patch/1112591/
http://patchwork.ozlabs.org/patch/1112592/

  arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 -
  configs/dh_imx6_defconfig                          | 1 +
  configs/display5_defconfig                         | 1 +
  configs/display5_factory_defconfig                 | 1 +
  configs/ge_bx50v3_defconfig                        | 1 +
  configs/kp_imx6q_tpc_defconfig                     | 1 +
  configs/m53menlo_defconfig                         | 1 +
  configs/mx53ppd_defconfig                          | 1 +
  configs/tqma6s_wru4_mmc_defconfig                  | 1 +
  configs/warp_defconfig                             | 1 +
  drivers/watchdog/Kconfig                           | 9 +++++++++
  include/configs/MPC8349ITX.h                       | 6 ------
  include/configs/MPC837XERDB.h                      | 5 -----
  include/configs/dh_imx6.h                          | 1 -
  include/configs/display5.h                         | 1 -
  include/configs/ge_bx50v3.h                        | 2 --
  include/configs/kp_imx6q_tpc.h                     | 1 -
  include/configs/m53menlo.h                         | 1 -
  include/configs/mx53ppd.h                          | 2 --
  include/configs/socfpga_common.h                   | 1 -
  include/configs/socfpga_stratix10_socdk.h          | 1 -
  include/configs/tqma6_wru4.h                       | 1 -
  include/configs/warp.h                             | 1 -
  include/wdt.h                                      | 3 ---
  scripts/config_whitelist.txt                       | 1 -
  25 files changed, 18 insertions(+), 28 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +0 -1
index 9583bf743e..d7f7b9f111 100644
@@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG.
  Use following config to set watchdog timeout, if this config is not defined,
  the default timeout value is 128s which is the maximum. Set 10 seconds for
  example:
-    #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000
  Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that the
  watchdog will not be fed in u-boot.
configs/dh_imx6_defconfig +1 -0
index d9ec5c7c5e..c3ef829553 100644
@@ -62,5 +62,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/display5_defconfig +1 -0
index 3b793f4500..1c52441802 100644
@@ -79,4 +79,5 @@ CONFIG_MII=y
  CONFIG_MXC_UART=y
  CONFIG_SPI=y
  CONFIG_MXC_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
  CONFIG_IMX_WATCHDOG=y
configs/display5_factory_defconfig +1 -0
index 0d9eed3a3e..1df7461a21 100644
@@ -86,5 +86,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
  CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/ge_bx50v3_defconfig +1 -0
index 8be881b939..cc056dc681 100644
@@ -60,5 +60,6 @@ CONFIG_DM_SPI=y
  CONFIG_MXC_SPI=y
  CONFIG_DM_VIDEO=y
  CONFIG_VIDEO_IPUV3=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
  CONFIG_IMX_WATCHDOG=y
  # CONFIG_EFI_LOADER is not set
configs/kp_imx6q_tpc_defconfig +1 -0
index 0ca83cbfea..7e9d2fc747 100644
@@ -40,5 +40,6 @@ CONFIG_FEC_MXC=y
  CONFIG_MII=y
  CONFIG_IMX_THERMAL=y
  CONFIG_USB=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/m53menlo_defconfig +1 -0
index 0e5fa01fde..6be311bf35 100644
@@ -69,6 +69,7 @@ CONFIG_USB_ETHER_SMSC95XX=y
  CONFIG_VIDEO_IPUV3=y
  CONFIG_VIDEO=y
  # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_FAT_WRITE=y
  CONFIG_OF_LIBFDT=y
configs/mx53ppd_defconfig +1 -0
index 19ebab78e9..8c8e9a28ed 100644
@@ -49,4 +49,5 @@ CONFIG_USB_EHCI_MX5=y
  CONFIG_VIDEO_IPUV3=y
  CONFIG_VIDEO=y
  # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
  CONFIG_IMX_WATCHDOG=y
configs/tqma6s_wru4_mmc_defconfig +1 -0
index 57f2221c78..ea29fa967b 100644
@@ -66,5 +66,6 @@ CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_USB_HOST_ETHER=y
  CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/warp_defconfig +1 -0
index a37d769296..e033cc9d8c 100644
@@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
drivers/watchdog/Kconfig +9 -0
index 5993865647..9784a998c4 100644
@@ -8,6 +8,15 @@ config WATCHDOG
  	  this option if you want to service enabled watchdog by U-Boot. Disable
  	  this option if you want U-Boot to start watchdog but never service it.
 
+config WATCHDOG_TIMEOUT_MSECS
+	int "Watchdog timeout in msec"
+	default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 || ARCH_MX6
+	default 128000 if ARCH_MX7 || ARCH_VF610
+	default 30000 if ARCH_SOCFPGA
+	default 60000
+	help
+	  Watchdog timeout in msec
+
  config HW_WATCHDOG
  	bool
 
include/configs/MPC8349ITX.h +0 -6
index a3f704c73b..c395d62379 100644
@@ -209,12 +209,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 
  #define CONFIG_SYS_VSC7385_BASE	0xF8000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
-
  #define CONFIG_SYS_LED_BASE	0xF9000000
 
 
include/configs/MPC837XERDB.h +0 -5
index 13a7682958..37f51ba743 100644
@@ -186,11 +186,6 @@
 
  #define CONFIG_SYS_VSC7385_BASE	0xF0000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
  /*
   * Serial Port
   */
include/configs/dh_imx6.h +0 -1
index 3eee382a64..54b61a0a06 100644
@@ -98,7 +98,6 @@
  #endif
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
include/configs/display5.h +0 -1
index 8829cbad91..9d7cb270a8 100644
@@ -361,7 +361,6 @@
  /* Commands */
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
 
  /* ENV config */
  #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/ge_bx50v3.h +0 -2
index 0481ed06a9..4bc2a8878b 100644
@@ -28,8 +28,6 @@
  #define CONFIG_REVISION_TAG
  #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000
-
  #define CONFIG_MXC_UART
 
  /* SATA Configs */
include/configs/kp_imx6q_tpc.h +0 -1
index d2ebf92953..4d075b47f6 100644
@@ -62,7 +62,6 @@
  #endif
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
include/configs/m53menlo.h +0 -1
index fc0b1f480c..ff6354904b 100644
@@ -156,7 +156,6 @@
  #define CONFIG_FSL_IIM
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
  /*
   * Boot Linux
include/configs/mx53ppd.h +0 -2
index 2d6715cba2..2944415d7f 100644
@@ -22,8 +22,6 @@
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
-
  #define CONFIG_BOARD_LATE_INIT
  #define CONFIG_REVISION_TAG
 
include/configs/socfpga_common.h +0 -1
index d1034ac280..d6a7caee19 100644
@@ -108,7 +108,6 @@
  #define CONFIG_DESIGNWARE_WATCHDOG
  #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
  #define CONFIG_DW_WDT_CLOCK_KHZ		25000
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	30000
  #endif
 
  /*
include/configs/socfpga_stratix10_socdk.h +0 -1
index 8d2971c6e2..27f87e75df 100644
@@ -167,7 +167,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  unsigned int cm_get_l4_sys_free_clk_hz(void);
  #define CONFIG_DW_WDT_CLOCK_KHZ		(cm_get_l4_sys_free_clk_hz() / 1000)
  #endif
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	3000
  #endif
 
  /*
include/configs/tqma6_wru4.h +0 -1
index 34f000f214..0af52e5565 100644
@@ -17,7 +17,6 @@
  #define CONSOLE_DEV		"ttymxc3"
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* Config on-board RTC */
  #define CONFIG_RTC_DS1337
include/configs/warp.h +0 -1
index 5345f5314d..41fd6c759e 100644
@@ -25,7 +25,6 @@
  #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
 
  #define CONFIG_SYS_MEMTEST_START	0x80000000
  #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + SZ_256M)
include/wdt.h +0 -3
index 5bcff24ab3..e833d3a772 100644
@@ -107,9 +107,6 @@ struct wdt_ops {
  };
 
  #if CONFIG_IS_ENABLED(WDT)
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
-#endif
  #define WATCHDOG_TIMEOUT_SECS	(CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)
 
  static inline int initr_watchdog(void)
scripts/config_whitelist.txt +0 -0
index 8651d569c5..921dc5290c 100644

scripts/config_whitelist.txt CONFIG_WATCHDOG_NOWAYOUT · line 4456

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -4451,7 +4451,6 @@ CONFIG_WATCHDOG_NOWAYOUT
  CONFIG_WATCHDOG_PRESC
  CONFIG_WATCHDOG_RC
  CONFIG_WATCHDOG_TIMEOUT
-CONFIG_WATCHDOG_TIMEOUT_MSECS
  CONFIG_WD_PERIOD
  CONFIG_X600
  CONFIG_X86EMU_DEBUG

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de
#2 lore raw

PATCH 1/1 watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

In reply to Heiko Schocher
Quoted 348 lines · On Wed, 12 Jun 2019 10:22:50 +0200 Heiko Schocher <[email protected]> wrote:

move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.

---

Patchseries build fine on travis see:
https://travis-ci.org/hsdenx/u-boot-test/builds/544546490

Based on mainline commit:
68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

and wdt imx patches from Marek:
http://patchwork.ozlabs.org/patch/1112591/
http://patchwork.ozlabs.org/patch/1112592/

 arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 -
 configs/dh_imx6_defconfig                          | 1 +
 configs/display5_defconfig                         | 1 +
 configs/display5_factory_defconfig                 | 1 +
 configs/ge_bx50v3_defconfig                        | 1 +
 configs/kp_imx6q_tpc_defconfig                     | 1 +
 configs/m53menlo_defconfig                         | 1 +
 configs/mx53ppd_defconfig                          | 1 +
 configs/tqma6s_wru4_mmc_defconfig                  | 1 +
 configs/warp_defconfig                             | 1 +
 drivers/watchdog/Kconfig                           | 9 +++++++++
 include/configs/MPC8349ITX.h                       | 6 ------
 include/configs/MPC837XERDB.h                      | 5 -----
 include/configs/dh_imx6.h                          | 1 -
 include/configs/display5.h                         | 1 -
 include/configs/ge_bx50v3.h                        | 2 --
 include/configs/kp_imx6q_tpc.h                     | 1 -
 include/configs/m53menlo.h                         | 1 -
 include/configs/mx53ppd.h                          | 2 --
 include/configs/socfpga_common.h                   | 1 -
 include/configs/socfpga_stratix10_socdk.h          | 1 -
 include/configs/tqma6_wru4.h                       | 1 -
 include/configs/warp.h                             | 1 -
 include/wdt.h                                      | 3 ---
 scripts/config_whitelist.txt                       | 1 -
 25 files changed, 18 insertions(+), 28 deletions(-)
(quoted diff) +0 -0

b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 index 9583bf743e..d7f7b9f111 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +++ b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 @@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG. Use following config to set watchdog timeout, if this config is not defined, the default timeout value is 128s which is the maximum. Set 10 seconds for example:
- #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000
Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that
the watchdog will not be fed in u-boot.

configs/dh_imx6_defconfig +1 -0
index d9ec5c7c5e..c3ef829553 100644
@@ -62,5 +62,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/display5_defconfig +1 -0
index 3b793f4500..1c52441802 100644
@@ -79,4 +79,5 @@ CONFIG_MII=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
(quoted diff) +0 -0

b/configs/display5_factory_defconfig index 0d9eed3a3e..1df7461a21 100644 --- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig

configs/display5_factory_defconfig +1 -0
@@ -86,5 +86,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/ge_bx50v3_defconfig +1 -0
index 8be881b939..cc056dc681 100644
@@ -60,5 +60,6 @@ CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
(quoted diff) +0 -0

b/configs/kp_imx6q_tpc_defconfig index 0ca83cbfea..7e9d2fc747 100644

configs/kp_imx6q_tpc_defconfig +1 -0
@@ -40,5 +40,6 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/m53menlo_defconfig +1 -0
index 0e5fa01fde..6be311bf35 100644
@@ -69,6 +69,7 @@ CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
configs/mx53ppd_defconfig +1 -0
index 19ebab78e9..8c8e9a28ed 100644
@@ -49,4 +49,5 @@ CONFIG_USB_EHCI_MX5=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
(quoted diff) +0 -0

b/configs/tqma6s_wru4_mmc_defconfig index 57f2221c78..ea29fa967b 100644 --- a/configs/tqma6s_wru4_mmc_defconfig
+++ b/configs/tqma6s_wru4_mmc_defconfig

configs/tqma6s_wru4_mmc_defconfig +1 -0
@@ -66,5 +66,6 @@ CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/warp_defconfig +1 -0
index a37d769296..e033cc9d8c 100644
@@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
drivers/watchdog/Kconfig +0 -0
index 5993865647..9784a998c4 100644
@@ -8,6 +8,15 @@ config WATCHDOG
 	  this option if you want to service enabled watchdog by

U-Boot. Disable this option if you want U-Boot to start watchdog but never service it.

drivers/watchdog/Kconfig +3 -0
+config WATCHDOG_TIMEOUT_MSECS
+	int "Watchdog timeout in msec"
+	default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 ||

ARCH_MX6

drivers/watchdog/Kconfig +6 -0
+	default 128000 if ARCH_MX7 || ARCH_VF610
+	default 30000 if ARCH_SOCFPGA
+	default 60000
+	help
+	  Watchdog timeout in msec
+
 config HW_WATCHDOG
 	bool
(quoted diff) +0 -0

b/include/configs/MPC8349ITX.h index a3f704c73b..c395d62379 100644

include/configs/MPC8349ITX.h +0 -0
@@ -209,12 +209,6 @@ boards, we say we have two, but don't display a

message if we find only one. */
#define CONFIG_SYS_VSC7385_BASE 0xF8000000

include/configs/MPC8349ITX.h +0 -6
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
-
 #define CONFIG_SYS_LED_BASE	0xF9000000
(quoted diff) +0 -0

b/include/configs/MPC837XERDB.h index 13a7682958..37f51ba743 100644

include/configs/MPC837XERDB.h +0 -5
@@ -186,11 +186,6 @@
 
 #define CONFIG_SYS_VSC7385_BASE	0xF0000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
 /*
  * Serial Port
  */
include/configs/dh_imx6.h +0 -1
index 3eee382a64..54b61a0a06 100644
@@ -98,7 +98,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/display5.h +0 -1
index 8829cbad91..9d7cb270a8 100644
@@ -361,7 +361,6 @@
 /* Commands */
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
 
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/ge_bx50v3.h +0 -2
index 0481ed06a9..4bc2a8878b 100644
@@ -28,8 +28,6 @@
 #define CONFIG_REVISION_TAG
 #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000
-
 #define CONFIG_MXC_UART
 
 /* SATA Configs */
(quoted diff) +0 -0

b/include/configs/kp_imx6q_tpc.h index d2ebf92953..4d075b47f6 100644

include/configs/kp_imx6q_tpc.h +0 -1
@@ -62,7 +62,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/m53menlo.h +0 -1
index fc0b1f480c..ff6354904b 100644
@@ -156,7 +156,6 @@
 #define CONFIG_FSL_IIM
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
 /*
  * Boot Linux
include/configs/mx53ppd.h +0 -2
index 2d6715cba2..2944415d7f 100644
@@ -22,8 +22,6 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
-
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_REVISION_TAG
 
(quoted diff) +0 -0

b/include/configs/socfpga_common.h index d1034ac280..d6a7caee19 100644

include/configs/socfpga_common.h +0 -1
@@ -108,7 +108,6 @@
 #define CONFIG_DESIGNWARE_WATCHDOG
 #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
 #define CONFIG_DW_WDT_CLOCK_KHZ		25000
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	30000
 #endif
 
 /*
(quoted diff) +0 -0

b/include/configs/socfpga_stratix10_socdk.h index 8d2971c6e2..27f87e75df 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -167,7 +167,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void); unsigned int cm_get_l4_sys_free_clk_hz(void); #define
CONFIG_DW_WDT_CLOCK_KHZ (cm_get_l4_sys_free_clk_hz() /
1000) #endif -#define CONFIG_WATCHDOG_TIMEOUT_MSECS 3000
#endif

/*

(quoted diff) +0 -0

b/include/configs/tqma6_wru4.h index 34f000f214..0af52e5565 100644

include/configs/tqma6_wru4.h +0 -1
@@ -17,7 +17,6 @@
 #define CONSOLE_DEV		"ttymxc3"
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* Config on-board RTC */
 #define CONFIG_RTC_DS1337
include/configs/warp.h +0 -1
index 5345f5314d..41fd6c759e 100644
@@ -25,7 +25,6 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
 
 #define CONFIG_SYS_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END

(CONFIG_SYS_MEMTEST_START + SZ_256M) diff --git a/include/wdt.h b/include/wdt.h index 5bcff24ab3..e833d3a772 100644

include/wdt.h +0 -3
@@ -107,9 +107,6 @@ struct wdt_ops {
 };
 
 #if CONFIG_IS_ENABLED(WDT)
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
-#endif
 #define WATCHDOG_TIMEOUT_SECS
 (CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000) 
 static inline int initr_watchdog(void)
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index 8651d569c5..921dc5290c 100644

scripts/config_whitelist.txt CONFIG_WATCHDOG_NOWAYOUT · line 4456

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -4451,7 +4451,6 @@ CONFIG_WATCHDOG_NOWAYOUT
 CONFIG_WATCHDOG_PRESC
 CONFIG_WATCHDOG_RC
 CONFIG_WATCHDOG_TIMEOUT
-CONFIG_WATCHDOG_TIMEOUT_MSECS
 CONFIG_WD_PERIOD
 CONFIG_X600
 CONFIG_X86EMU_DEBUG

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190612/3ee10f3c/attachment.sig>

#3 lore raw

PATCH 1/1 watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

In reply to Heiko Schocher
Quoted 34 lines · Heiko Schocher

move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.

---

Patchseries build fine on travis see:
https://travis-ci.org/hsdenx/u-boot-test/builds/544546490

Based on mainline commit:
68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

and wdt imx patches from Marek:
http://patchwork.ozlabs.org/patch/1112591/
http://patchwork.ozlabs.org/patch/1112592/

 arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 -
 configs/dh_imx6_defconfig                          | 1 +
 configs/display5_defconfig                         | 1 +
 configs/display5_factory_defconfig                 | 1 +
 configs/ge_bx50v3_defconfig                        | 1 +
 configs/kp_imx6q_tpc_defconfig                     | 1 +
 configs/m53menlo_defconfig                         | 1 +
 configs/mx53ppd_defconfig                          | 1 +
 configs/tqma6s_wru4_mmc_defconfig                  | 1 +
 configs/warp_defconfig                             | 1 +
 drivers/watchdog/Kconfig                           | 9 +++++++++
 include/configs/MPC8349ITX.h                       | 6 ------
 include/configs/MPC837XERDB.h                      | 5 -----
 include/configs/dh_imx6.h                          | 1 -
 include/configs/display5.h                         | 1 -
 include/configs/ge_bx50v3.h                        | 2 --
 include/configs/kp_imx6q_tpc.h                     | 1 -
 include/configs/m53menlo.h                         | 1 -
Quoted 9 lines
 include/configs/mx53ppd.h                          | 2 --
 include/configs/socfpga_common.h                   | 1 -
 include/configs/socfpga_stratix10_socdk.h          | 1 -
 include/configs/tqma6_wru4.h                       | 1 -
 include/configs/warp.h                             | 1 -
 include/wdt.h                                      | 3 ---
 scripts/config_whitelist.txt                       | 1 -
 25 files changed, 18 insertions(+), 28 deletions(-)
Quoted 333 lines
arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +0 -0
index 9583bf743e..d7f7b9f111 100644
@@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG.
 Use following config to set watchdog timeout, if this config is not
 defined,
 the default timeout value is 128s which is the maximum. Set 10

seconds for
example:
- #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000
Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that
the
watchdog will not be fed in u-boot.

configs/dh_imx6_defconfig +1 -0
index d9ec5c7c5e..c3ef829553 100644
@@ -62,5 +62,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/display5_defconfig +1 -0
index 3b793f4500..1c52441802 100644
@@ -79,4 +79,5 @@ CONFIG_MII=y
 CONFIG_MXC_UART=y
 CONFIG_SPI=y
 CONFIG_MXC_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
configs/display5_factory_defconfig +1 -0
index 0d9eed3a3e..1df7461a21 100644
@@ -86,5 +86,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
 CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/ge_bx50v3_defconfig +1 -0
index 8be881b939..cc056dc681 100644
@@ -60,5 +60,6 @@ CONFIG_DM_SPI=y
 CONFIG_MXC_SPI=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_IPUV3=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
 CONFIG_IMX_WATCHDOG=y
 # CONFIG_EFI_LOADER is not set
configs/kp_imx6q_tpc_defconfig +1 -0
index 0ca83cbfea..7e9d2fc747 100644
@@ -40,5 +40,6 @@ CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_IMX_THERMAL=y
 CONFIG_USB=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/m53menlo_defconfig +1 -0
index 0e5fa01fde..6be311bf35 100644
@@ -69,6 +69,7 @@ CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
configs/mx53ppd_defconfig +1 -0
index 19ebab78e9..8c8e9a28ed 100644
@@ -49,4 +49,5 @@ CONFIG_USB_EHCI_MX5=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
 # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
 CONFIG_IMX_WATCHDOG=y
configs/tqma6s_wru4_mmc_defconfig +1 -0
index 57f2221c78..ea29fa967b 100644
@@ -66,5 +66,6 @@ CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
configs/warp_defconfig +1 -0
index a37d769296..e033cc9d8c 100644
@@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
 CONFIG_IMX_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
drivers/watchdog/Kconfig +0 -0
index 5993865647..9784a998c4 100644
@@ -8,6 +8,15 @@ config WATCHDOG
 	  this option if you want to service enabled watchdog by U-

Boot. Disable
this option if you want U-Boot to start watchdog but never
service it.

drivers/watchdog/Kconfig +3 -0
+config WATCHDOG_TIMEOUT_MSECS
+	int "Watchdog timeout in msec"
+	default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 ||

ARCH_MX6

drivers/watchdog/Kconfig +6 -0
+	default 128000 if ARCH_MX7 || ARCH_VF610
+	default 30000 if ARCH_SOCFPGA
+	default 60000
+	help
+	  Watchdog timeout in msec
+
 config HW_WATCHDOG
 	bool
include/configs/MPC8349ITX.h +0 -0
index a3f704c73b..c395d62379 100644
@@ -209,12 +209,6 @@ boards, we say we have two, but don't display a

message if we find only one. */

#define CONFIG_SYS_VSC7385_BASE 0xF8000000

include/configs/MPC8349ITX.h +0 -6
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
-
 #define CONFIG_SYS_LED_BASE	0xF9000000
include/configs/MPC837XERDB.h +0 -5
index 13a7682958..37f51ba743 100644
@@ -186,11 +186,6 @@
 
 #define CONFIG_SYS_VSC7385_BASE	0xF0000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
 /*
  * Serial Port
  */
include/configs/dh_imx6.h +0 -1
index 3eee382a64..54b61a0a06 100644
@@ -98,7 +98,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/display5.h +0 -1
index 8829cbad91..9d7cb270a8 100644
@@ -361,7 +361,6 @@
 /* Commands */
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
 
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/ge_bx50v3.h +0 -2
index 0481ed06a9..4bc2a8878b 100644
@@ -28,8 +28,6 @@
 #define CONFIG_REVISION_TAG
 #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000
-
 #define CONFIG_MXC_UART
 
 /* SATA Configs */
include/configs/kp_imx6q_tpc.h +0 -1
index d2ebf92953..4d075b47f6 100644
@@ -62,7 +62,6 @@
 #endif
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
include/configs/m53menlo.h +0 -1
index fc0b1f480c..ff6354904b 100644
@@ -156,7 +156,6 @@
 #define CONFIG_FSL_IIM
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
 /*
  * Boot Linux
include/configs/mx53ppd.h +0 -2
index 2d6715cba2..2944415d7f 100644
@@ -22,8 +22,6 @@
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
-
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_REVISION_TAG
 
include/configs/socfpga_common.h +0 -1
index d1034ac280..d6a7caee19 100644
@@ -108,7 +108,6 @@
 #define CONFIG_DESIGNWARE_WATCHDOG
 #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
 #define CONFIG_DW_WDT_CLOCK_KHZ		25000
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	30000
 #endif
 
 /*
include/configs/socfpga_stratix10_socdk.h +0 -1
index 8d2971c6e2..27f87e75df 100644
@@ -167,7 +167,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 unsigned int cm_get_l4_sys_free_clk_hz(void);
 #define CONFIG_DW_WDT_CLOCK_KHZ		(cm_get_l4_sys_free_clk
 _hz() / 1000)
 #endif
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	3000
 #endif
 

/*

include/configs/tqma6_wru4.h +0 -1
index 34f000f214..0af52e5565 100644
@@ -17,7 +17,6 @@
 #define CONSOLE_DEV		"ttymxc3"
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
 /* Config on-board RTC */
 #define CONFIG_RTC_DS1337
include/configs/warp.h +0 -1
index 5345f5314d..41fd6c759e 100644
@@ -25,7 +25,6 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 
 /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
 
 #define CONFIG_SYS_MEMTEST_START	0x80000000
 #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_STA

RT + SZ_256M)

include/wdt.h +0 -3
index 5bcff24ab3..e833d3a772 100644
@@ -107,9 +107,6 @@ struct wdt_ops {
 };
 
 #if CONFIG_IS_ENABLED(WDT)
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
-#endif
 #define WATCHDOG_TIMEOUT_SECS	(CONFIG_WATCHDOG_TIMEOUT_MSECS
 / 1000)
 

static inline int initr_watchdog(void)

scripts/config_whitelist.txt +0 -1
index 8651d569c5..921dc5290c 100644
@@ -4451,7 +4451,6 @@ CONFIG_WATCHDOG_NOWAYOUT
 CONFIG_WATCHDOG_PRESC
 CONFIG_WATCHDOG_RC
 CONFIG_WATCHDOG_TIMEOUT
-CONFIG_WATCHDOG_TIMEOUT_MSECS
 CONFIG_WD_PERIOD
 CONFIG_X600
 CONFIG_X86EMU_DEBUG
#4 lore raw

PATCH 1/1 watchdog: move WATCHDOG_TIMEOUT_MSECS to Kconfig

In reply to Heiko Schocher

Hi Heiko,

Quoted 34 lines · Heiko Schocher

move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.

---

Patchseries build fine on travis see:
https://travis-ci.org/hsdenx/u-boot-test/builds/544546490

Based on mainline commit:
68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

and wdt imx patches from Marek:
http://patchwork.ozlabs.org/patch/1112591/
http://patchwork.ozlabs.org/patch/1112592/

  arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 | 1 -
  configs/dh_imx6_defconfig                          | 1 +
  configs/display5_defconfig                         | 1 +
  configs/display5_factory_defconfig                 | 1 +
  configs/ge_bx50v3_defconfig                        | 1 +
  configs/kp_imx6q_tpc_defconfig                     | 1 +
  configs/m53menlo_defconfig                         | 1 +
  configs/mx53ppd_defconfig                          | 1 +
  configs/tqma6s_wru4_mmc_defconfig                  | 1 +
  configs/warp_defconfig                             | 1 +
  drivers/watchdog/Kconfig                           | 9 +++++++++
  include/configs/MPC8349ITX.h                       | 6 ------
  include/configs/MPC837XERDB.h                      | 5 -----
  include/configs/dh_imx6.h                          | 1 -
  include/configs/display5.h                         | 1 -
  include/configs/ge_bx50v3.h                        | 2 --
  include/configs/kp_imx6q_tpc.h                     | 1 -
  include/configs/m53menlo.h                         | 1 -
Quoted 8 lines
  include/configs/mx53ppd.h                          | 2 --
  include/configs/socfpga_common.h                   | 1 -
  include/configs/socfpga_stratix10_socdk.h          | 1 -
  include/configs/tqma6_wru4.h                       | 1 -
  include/configs/warp.h                             | 1 -
  include/wdt.h                                      | 3 ---
  scripts/config_whitelist.txt                       | 1 -
  25 files changed, 18 insertions(+), 28 deletions(-)

This patch does not apply any more. Could you please rebase and send a new version?

Thanks,
Stefan

Quoted 304 lines
arch/arm/cpu/armv8/fsl-layerscape/doc/README.lsch2 +0 -1
index 9583bf743e..d7f7b9f111 100644
@@ -16,6 +16,5 @@ You can enable it by setting CONFIG_IMX_WATCHDOG.
  Use following config to set watchdog timeout, if this config is not defined,
  the default timeout value is 128s which is the maximum. Set 10 seconds for
  example:
-    #define CONFIG_WATCHDOG_TIMEOUT_MSECS 10000
  Set CONFIG_WATCHDOG_RESET_DISABLE to disable reset watchdog, so that the
  watchdog will not be fed in u-boot.
configs/dh_imx6_defconfig +1 -0
index d9ec5c7c5e..c3ef829553 100644
@@ -62,5 +62,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/display5_defconfig +1 -0
index 3b793f4500..1c52441802 100644
@@ -79,4 +79,5 @@ CONFIG_MII=y
  CONFIG_MXC_UART=y
  CONFIG_SPI=y
  CONFIG_MXC_SPI=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
  CONFIG_IMX_WATCHDOG=y
configs/display5_factory_defconfig +1 -0
index 0d9eed3a3e..1df7461a21 100644
@@ -86,5 +86,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b67
  CONFIG_USB_GADGET_PRODUCT_NUM=0x4000
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=15000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/ge_bx50v3_defconfig +1 -0
index 8be881b939..cc056dc681 100644
@@ -60,5 +60,6 @@ CONFIG_DM_SPI=y
  CONFIG_MXC_SPI=y
  CONFIG_DM_VIDEO=y
  CONFIG_VIDEO_IPUV3=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=6000
  CONFIG_IMX_WATCHDOG=y
  # CONFIG_EFI_LOADER is not set
configs/kp_imx6q_tpc_defconfig +1 -0
index 0ca83cbfea..7e9d2fc747 100644
@@ -40,5 +40,6 @@ CONFIG_FEC_MXC=y
  CONFIG_MII=y
  CONFIG_IMX_THERMAL=y
  CONFIG_USB=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/m53menlo_defconfig +1 -0
index 0e5fa01fde..6be311bf35 100644
@@ -69,6 +69,7 @@ CONFIG_USB_ETHER_SMSC95XX=y
  CONFIG_VIDEO_IPUV3=y
  CONFIG_VIDEO=y
  # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_FAT_WRITE=y
  CONFIG_OF_LIBFDT=y
configs/mx53ppd_defconfig +1 -0
index 19ebab78e9..8c8e9a28ed 100644
@@ -49,4 +49,5 @@ CONFIG_USB_EHCI_MX5=y
  CONFIG_VIDEO_IPUV3=y
  CONFIG_VIDEO=y
  # CONFIG_VIDEO_SW_CURSOR is not set
+CONFIG_WATCHDOG_TIMEOUT_MSECS=8000
  CONFIG_IMX_WATCHDOG=y
configs/tqma6s_wru4_mmc_defconfig +1 -0
index 57f2221c78..ea29fa967b 100644
@@ -66,5 +66,6 @@ CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_USB_HOST_ETHER=y
  CONFIG_USB_ETHER_SMSC95XX=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
configs/warp_defconfig +1 -0
index a37d769296..e033cc9d8c 100644
@@ -39,5 +39,6 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
  CONFIG_CI_UDC=y
  CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=30000
  CONFIG_IMX_WATCHDOG=y
  CONFIG_OF_LIBFDT=y
drivers/watchdog/Kconfig +9 -0
index 5993865647..9784a998c4 100644
@@ -8,6 +8,15 @@ config WATCHDOG
  	  this option if you want to service enabled watchdog by U-Boot. Disable
  	  this option if you want U-Boot to start watchdog but never service it.
 
+config WATCHDOG_TIMEOUT_MSECS
+	int "Watchdog timeout in msec"
+	default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 || ARCH_MX6
+	default 128000 if ARCH_MX7 || ARCH_VF610
+	default 30000 if ARCH_SOCFPGA
+	default 60000
+	help
+	  Watchdog timeout in msec
+
  config HW_WATCHDOG
  	bool
 
include/configs/MPC8349ITX.h +0 -6
index a3f704c73b..c395d62379 100644
@@ -209,12 +209,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 
  #define CONFIG_SYS_VSC7385_BASE	0xF8000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
-
  #define CONFIG_SYS_LED_BASE	0xF9000000
 
 
include/configs/MPC837XERDB.h +0 -5
index 13a7682958..37f51ba743 100644
@@ -186,11 +186,6 @@
 
  #define CONFIG_SYS_VSC7385_BASE	0xF0000000
 
-#ifdef CONFIG_VSC7385_ENET
-
-
-#endif
-
  /*
   * Serial Port
   */
include/configs/dh_imx6.h +0 -1
index 3eee382a64..54b61a0a06 100644
@@ -98,7 +98,6 @@
  #endif
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
include/configs/display5.h +0 -1
index 8829cbad91..9d7cb270a8 100644
@@ -361,7 +361,6 @@
  /* Commands */
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS   15000
 
  /* ENV config */
  #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/ge_bx50v3.h +0 -2
index 0481ed06a9..4bc2a8878b 100644
@@ -28,8 +28,6 @@
  #define CONFIG_REVISION_TAG
  #define CONFIG_SYS_MALLOC_LEN		(10 * SZ_1M)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 6000
-
  #define CONFIG_MXC_UART
 
  /* SATA Configs */
include/configs/kp_imx6q_tpc.h +0 -1
index d2ebf92953..4d075b47f6 100644
@@ -62,7 +62,6 @@
  #endif
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* allow to overwrite serial and ethaddr */
  #define CONFIG_ENV_OVERWRITE
include/configs/m53menlo.h +0 -1
index fc0b1f480c..ff6354904b 100644
@@ -156,7 +156,6 @@
  #define CONFIG_FSL_IIM
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
 
  /*
   * Boot Linux
include/configs/mx53ppd.h +0 -2
index 2d6715cba2..2944415d7f 100644
@@ -22,8 +22,6 @@
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
 
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
-
  #define CONFIG_BOARD_LATE_INIT
  #define CONFIG_REVISION_TAG
 
include/configs/socfpga_common.h +0 -1
index d1034ac280..d6a7caee19 100644
@@ -108,7 +108,6 @@
  #define CONFIG_DESIGNWARE_WATCHDOG
  #define CONFIG_DW_WDT_BASE		SOCFPGA_L4WD0_ADDRESS
  #define CONFIG_DW_WDT_CLOCK_KHZ		25000
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	30000
  #endif
 
  /*
include/configs/socfpga_stratix10_socdk.h +0 -1
index 8d2971c6e2..27f87e75df 100644
@@ -167,7 +167,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  unsigned int cm_get_l4_sys_free_clk_hz(void);
  #define CONFIG_DW_WDT_CLOCK_KHZ		(cm_get_l4_sys_free_clk_hz() / 1000)
  #endif
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	3000
  #endif
 
  /*
include/configs/tqma6_wru4.h +0 -1
index 34f000f214..0af52e5565 100644
@@ -17,7 +17,6 @@
  #define CONSOLE_DEV		"ttymxc3"
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	60000
 
  /* Config on-board RTC */
  #define CONFIG_RTC_DS1337
include/configs/warp.h +0 -1
index 5345f5314d..41fd6c759e 100644
@@ -25,7 +25,6 @@
  #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 
  /* Watchdog */
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS 30000 /* 30s */
 
  #define CONFIG_SYS_MEMTEST_START	0x80000000
  #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_MEMTEST_START + SZ_256M)
include/wdt.h +0 -3
index 5bcff24ab3..e833d3a772 100644
@@ -107,9 +107,6 @@ struct wdt_ops {
  };
 
  #if CONFIG_IS_ENABLED(WDT)
-#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
-#define CONFIG_WATCHDOG_TIMEOUT_MSECS	(60 * 1000)
-#endif
  #define WATCHDOG_TIMEOUT_SECS	(CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000)
 
  static inline int initr_watchdog(void)
scripts/config_whitelist.txt +0 -0
index 8651d569c5..921dc5290c 100644

scripts/config_whitelist.txt CONFIG_WATCHDOG_NOWAYOUT · line 4456

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -4451,7 +4451,6 @@ CONFIG_WATCHDOG_NOWAYOUT
  CONFIG_WATCHDOG_PRESC
  CONFIG_WATCHDOG_RC
  CONFIG_WATCHDOG_TIMEOUT
-CONFIG_WATCHDOG_TIMEOUT_MSECS
  CONFIG_WD_PERIOD
  CONFIG_X600
  CONFIG_X86EMU_DEBUG

Viele Grüße,
Stefan

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de