]> git.baikalelectronics.ru Git - uboot.git/commitdiff
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 fa56061108dfc285f65cefe83806a331c7c82ead..9935666e4fce2f40145045ea283329b0f2816e5f 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 1ab37cc9fc3d45468ca9bc7f6c716b3c8acf1ed6..97c0b7b834e7ff60309f5ad5e0cb2521a19cfbad 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 d5fe336d22dec5e144c59226613a63091ae02932..5c1af1a7720fded226e29904d0ed2c81a1e7541d 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 d26628aa2baf5a3b9f4449d472052e6d5401747a..a97c4ffd488160c602bb4cce1e5cd086134c20db 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 1f63bc8467dfb0caf7921c631d501765988ca37d..d62bd961decc2f3509040954277816ae7755f561 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 145b28ee9813178406b4f6bb2b79594282a0ecaf..26af4a6bfee3195bf83654e58ac3417a5661d927 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 e0b36f4cdbfa39768f87cb35fee471c514e7e6ac..218a33d9a02bfec89f2e975012c7b466d0130f49 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 4f77fd7fe3df0386669deecc4da0b333f4f9785b..006c80cc7a0a0a1d295dbd5a4ed3088bab3999e6 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 2e5105053a54c067052d939729d1e720f3035a92..ac5afe6b1a853b45d14c64e21e2332ad6d931e0f 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 6a69ac45aee4dbe0741ed5bcb45366c66e7cdf2c..717e3e4415d5707ad01494768176d7854b7078ab 100644 (file)
@@ -15,7 +15,6 @@
  */
 #define CONFIG_SYS_UART_PORT           (0)
 
-#undef CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT                5000
 
 #ifdef CONFIG_MCFFEC
index 7421f3b7605db1a86ba852ddf13746f5bf63379e..2e5220f17a6401b5a81e285a2383abb0e9c99196 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 7ee0ec6a4a89b49bfea7c03d2510b48f5fa1e86a..00892ec44dcde931100a9b27078623bc0dc715cc 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 e9a7922921933926879b124e14110db798049c9d..ff290964252abaeb50d0265b866a054bdf4fdeae 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 2121b294fb54ecdb171361e6e7f9e04197ea5e94..e814a2924c634d8256254d251e8e71f788bbf221 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 7b33677c551d0894656755f2cdf672518cea0e67..58b75b217e113fbef3bddf9a7496629b7e88fcf8 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 19d8cfe32173bb4db89cbc9aa7e76a301c80bead..f172db09173652dfb8ed9870c02930abe394edcb 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 e2ddc4893e770b253a81ab3f298c4c2a7de57877..ddcd7521cf7c0300f88ee2b41d707c14ef6fed3e 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 9aeab7097aef16b3af1450fc5dce2163e6ee985e..9a34e5444b1c00c586cc5d074715017d0dcdbb73 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 ab029aab64fe88080b7aca64a0fa2bf098c1b2c9..bedb12b56ec77daa750bd92ff1424ad332d5fe2d 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index 349b4860ef8c41e06c165bbd4851118414864d01..abf3b513a830e2c31183e51752a7f31502f00542 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 2167dcd4444cefa6bf44dae34143f451b3a346af..d66acd1efa83598fe76d33914427bdaab529f488 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index e09b9a4187f7bc6f05bbce4e381bd9002891150d..297246a0bc3daf5b800d225f1f2cbf958df8a4e3 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 2e7927bc3714285a07692a1c79fffcf9626b5b9f..1af343899c600e33a65135b9fa7500e6f748c2c1 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 be62caabb5a6b7fab3b468fe8040deaa9fc949ff..3e19e99c248330115ad447ccf913ca17f6295b94 100644 (file)
@@ -54,7 +54,6 @@
  */
 
 #if 0
-#define CONFIG_WATCHDOG
 #define CONFIG_WATCHDOG_TIMEOUT 10000  /* timeout in milliseconds */
 #endif
 
index 3233bf16a5d2175cc14471142e36c1ac75e99ca2..8b8cd4c31b4018dc5bb19777eb934ca0c2452d6f 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 8633efbd6c1723a09841e8debb5c13be37de0467..38ac86928929d2809e44f371917b0d10dc73c055 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 6a32bc649a5a7f67cc87557a57e60258ad3c8f8f..bf1cfc3addb82af1e58a374fa5c8143cc5caf194 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 49f5d68892ed3803220350f50ae2cddc3bd2387e..c88c72dfddabf7bf13b0d2a3ebe2e9bbf5648bab 100644 (file)
 /*
  * HW-Watchdog
  */
-#define CONFIG_WATCHDOG                1
 #define CONFIG_SYS_WATCHDOG_VALUE      0xFFFF
 
 /*
index 2844553067cf3cfa4d9590d40987056f6088680b..124aab0eff08ecef84c029d4a6f0f0f5cacac0e2 100644 (file)
                "fi ; "                                                 \
                "fi\0"
 
-#if defined(CONFIG_SPL_BUILD)
-#undef CONFIG_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-#endif
-
 #endif /* __M53MENLO_CONFIG_H__ */
index a2958e78e4c1388658c9df12774627b95485de2e..b31e11d085866f4a8561bdc00431f3027cb2bde9 100644 (file)
 #define CONFIG_SYS_FSL_ESDHC_ADDR      CONFIG_SYS_MPC85xx_ESDHC_ADDR
 #endif
 
-#undef CONFIG_WATCHDOG /* watchdog disabled */
-
 /*
  * Miscellaneous configurable options
  */
index aa2c032476726de4ea63d0642f9e6bd003e63fd5..928582ab8cfce3e8bf76fde2e7ff8df2ae1ab5f3 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 b7296daa374754848a3f9f89f6c5dac9548d647f..5052c72f54b6dfd9a2fb4059d350443a217fff8c 100644 (file)
  */
 #define CONFIG_BOOTP_BOOTFILESIZE
 
-#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
-
 /*
  * Miscellaneous configurable options
  */