Finish converting CONFIG_WATCHDOG, HW_WATCHDOG and WDT to Kconfig
authorTom Rini <trini@konsulko.com>
Mon, 13 Dec 2021 03:12:27 +0000 (22:12 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 27 Dec 2021 13:41:38 +0000 (08:41 -0500)
Because of how these symbols work, and the remaining board config.h file
uses, we need to do these at the same time.  In some cases we just get
to move rather directly to the defconfigs.  A few cases require manual
intervention.

For the case of the eb_cpu5282 we need to select HW_WATCHDOG for the
target, given how it's implemented.

For the cases of m53menlo, dh_imx6, display5, and display5_factory we
disable SPL watchdog support as the particular combination of options
they want would require either more symbols or enabling SPL_DM.

Signed-off-by: Tom Rini <trini@konsulko.com>
32 files changed:
README
arch/m68k/Kconfig
board/liebherr/display5/spl.c
configs/astro_mcf5373l_defconfig
configs/dh_imx6_defconfig
configs/display5_defconfig
configs/display5_factory_defconfig
configs/ids8313_defconfig
configs/m53menlo_defconfig
include/configs/M5208EVBE.h
include/configs/M5235EVB.h
include/configs/M5249EVB.h
include/configs/M5253DEMO.h
include/configs/M5272C3.h
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/MPC837XERDB.h
include/configs/MPC8540ADS.h
include/configs/MPC8548CDS.h
include/configs/MPC8560ADS.h
include/configs/P1010RDB.h
include/configs/astro_mcf5373l.h
include/configs/cobra5272.h
include/configs/dh_imx6.h
include/configs/display5.h
include/configs/eb_cpu5282.h
include/configs/ids8313.h
include/configs/m53menlo.h
include/configs/p1_p2_rdb_pc.h
include/configs/socfpga_soc64_common.h
include/configs/socrates.h

diff --git a/README b/README
index fa56061..9935666 100644 (file)
--- a/README
+++ b/README
@@ -639,20 +639,6 @@ The following options need to be configured:
                example "env grep" and "setexpr".
 
 - Watchdog:
-               CONFIG_WATCHDOG
-               If this variable is defined, it enables watchdog
-               support for the SoC. There must be support in the SoC
-               specific code for a watchdog. For the 8xx
-               CPUs, the SIU Watchdog feature is enabled in the SYPCR
-               register.  When supported for a specific SoC is
-               available, then no further board specific code should
-               be needed to use it.
-
-               CONFIG_HW_WATCHDOG
-               When using a watchdog circuitry external to the used
-               SoC, then define this variable and provide board
-               specific code for the "hw_watchdog_reset" function.
-
                CONFIG_SYS_WATCHDOG_FREQ
                Some platforms automatically call WATCHDOG_RESET()
                from the timer interrupt handler every
index 1ab37cc..97c0b7b 100644 (file)
@@ -128,6 +128,7 @@ config TARGET_COBRA5272
 config TARGET_EB_CPU5282
        bool "Support eb_cpu5282"
        select M5282
+       select HW_WATCHDOG
 
 config TARGET_M5208EVBE
        bool "Support M5208EVBE"
index d5fe336..5c1af1a 100644 (file)
@@ -327,8 +327,10 @@ void board_init_f(ulong dummy)
        displ5_set_iomux_misc_spl();
 
        /* Initialize and reset WDT in SPL */
+#ifdef CONFIG_SPL_WATCHDOG
        hw_watchdog_init();
        WATCHDOG_RESET();
+#endif
 
        /* load/boot image from boot device */
        board_init_r(NULL, 0);
index d26628a..a97c4ff 100644 (file)
@@ -40,3 +40,4 @@ CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG=y
index 1f63bc8..d62bd96 100644 (file)
@@ -37,7 +37,6 @@ CONFIG_BOOTDELAY=3
 CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x11400
-CONFIG_SPL_WATCHDOG=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_UNZIP=y
 CONFIG_CMD_DFU=y
index 145b28e..26af4a6 100644 (file)
@@ -45,7 +45,6 @@ CONFIG_SPL_I2C=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="display5 > "
 CONFIG_CMD_BOOTZ=y
index e0b36f4..218a33d 100644 (file)
@@ -43,7 +43,6 @@ CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_SPL_USB_HOST=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="display5 factory > "
 CONFIG_CMD_BOOTZ=y
index 4f77fd7..006c80c 100644 (file)
@@ -199,4 +199,5 @@ CONFIG_TSEC_ENET=y
 # CONFIG_PCI is not set
 CONFIG_RTC_PCF8563=y
 CONFIG_SYS_NS16550=y
+CONFIG_WATCHDOG=y
 CONFIG_OF_LIBFDT=y
index 2e51050..ac5afe6 100644 (file)
@@ -36,7 +36,6 @@ CONFIG_PREBOOT="run try_bootscript"
 CONFIG_BOARD_LATE_INIT=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SPL_WATCHDOG=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
index 6a69ac4..717e3e4 100644 (file)
@@ -15,7 +15,6 @@
  */
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT                5000
 
 #ifdef CONFIG_MCFFEC
index 7421f3b..2e5220f 100644 (file)
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
 
 /*
index 7ee0ec6..00892ec 100644 (file)
@@ -21,8 +21,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef  CONFIG_WATCHDOG
-
 #undef CONFIG_MONITOR_IS_IN_RAM                /* no pre-loader required!!! ;-) */
 
 /*
index e9a7922..ff29096 100644 (file)
@@ -12,8 +12,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG         /* disable watchdog */
-
 
 /* Configuration for environment
  * Environment is embedded in u-boot in the second sector of the flash
index 2121b29..e814a29 100644 (file)
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 10000  /* timeout in milliseconds */
 
 #undef CONFIG_MONITOR_IS_IN_RAM        /* define if monitor is started from a pre-loader */
index 7b33677..58b75b2 100644 (file)
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT                5000
 
 #define CONFIG_SYS_UNIFY_CACHE
index 19d8cfe..f172db0 100644 (file)
@@ -20,7 +20,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
 
 #define CONFIG_SYS_UNIFY_CACHE
index e2ddc48..ddcd752 100644 (file)
@@ -22,7 +22,6 @@
 
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT        3360    /* timeout in ms, max is 3.36 sec */
 
 #define CONFIG_SYS_UNIFY_CACHE
index 9aeab70..9a34e54 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG         /* watchdog disabled */
-
 #ifdef CONFIG_MMC
 #define CONFIG_FSL_ESDHC_PIN_MUX
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC83xx_ESDHC_ADDR
index ab029aa..bedb12b 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index 349b486..abf3b51 100644 (file)
@@ -384,8 +384,6 @@ extern unsigned long get_clock_freq(void);
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index 2167dcd..d66acd1 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index e09b9a4..297246a 100644 (file)
@@ -595,8 +595,6 @@ extern unsigned long get_sdram_size(void);
 #define CONFIG_LOADS_ECHO              /* echo on for serial download */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   /* allow baudrate change */
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 #if defined(CONFIG_MMC) || defined(CONFIG_USB_EHCI_HCD) \
                 || defined(CONFIG_FSL_SATA)
 #endif
index 2e7927b..1af3438 100644 (file)
@@ -91,7 +91,6 @@
  */
 
 #ifndef CONFIG_MONITOR_IS_IN_RAM
-#define CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 3355   /* timeout in milliseconds */
 #endif
 
index be62caa..3e19e99 100644 (file)
@@ -54,7 +54,6 @@
  */
 
 #if 0
-#define CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 10000  /* timeout in milliseconds */
 #endif
 
index 3233bf1..8b8cd4c 100644 (file)
 #endif
 #endif
 
-/* Watchdog */
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WDT
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS      \
        "console=ttymxc0,115200\0"      \
index 8633efb..38ac869 100644 (file)
 #define CONFIG_SYS_INIT_SP_ADDR \
        (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
 
-/* Watchdog */
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WDT
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 /* ENV config */
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 /* The 0x120000 value corresponds to above SPI-NOR memory MAP */
index 6a32bc6..bf1cfc3 100644 (file)
@@ -25,8 +25,6 @@
 #define CONFIG_BOOT_RETRY_TIME -1
 #define CONFIG_RESET_TO_RETRY
 
-#define CONFIG_HW_WATCHDOG
-
 #define STATUS_LED_ACTIVE              0
 
 /*----------------------------------------------------------------------*
index 49f5d68..c88c72d 100644 (file)
 /*
  * HW-Watchdog
  */
-#define CONFIG_WATCHDOG                1
 #define CONFIG_SYS_WATCHDOG_VALUE      0xFFFF
 
 /*
index 2844553..124aab0 100644 (file)
                "fi ; "                                                 \
                "fi\0"
 
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 #endif /* __M53MENLO_CONFIG_H__ */
index a2958e7..b31e11d 100644 (file)
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC85xx_ESDHC_ADDR
 #endif
 
-#undef CONFIG_WATCHDOG /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index aa2c032..928582a 100644 (file)
@@ -147,7 +147,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * L4 Watchdog
  */
 #ifndef CONFIG_SPL_BUILD
-#undef CONFIG_HW_WATCHDOG
 #undef CONFIG_DESIGNWARE_WATCHDOG
 #endif
 #define CONFIG_DW_WDT_BASE             SOCFPGA_L4WD0_ADDRESS
index b7296da..5052c72 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
 /*
  * Miscellaneous configurable options
  */