m68k: Rename CONFIG_WATCHDOG_TIMEOUT to CONFIG_WATCHDOG_TIMEOUT_MSECS
authorTom Rini <trini@konsulko.com>
Sat, 19 Nov 2022 23:45:45 +0000 (18:45 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 5 Dec 2022 23:16:43 +0000 (18:16 -0500)
In practice, it is clear that the usage in m68k of
CONFIG_WATCHDOG_TIMEOUT is setting a value in milliseconds. Rename this
to the existing symbol and move to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
20 files changed:
arch/m68k/cpu/mcf523x/cpu.c
arch/m68k/cpu/mcf52x2/cpu.c
arch/m68k/cpu/mcf532x/cpu.c
configs/M5208EVBE_defconfig
configs/M5235EVB_Flash32_defconfig
configs/M5235EVB_defconfig
configs/M5272C3_defconfig
configs/M53017EVB_defconfig
configs/M5329AFEE_defconfig
configs/M5329BFEE_defconfig
configs/M5373EVB_defconfig
configs/astro_mcf5373l_defconfig
include/configs/M5208EVBE.h
include/configs/M5235EVB.h
include/configs/M5272C3.h
include/configs/M53017EVB.h
include/configs/M5329EVB.h
include/configs/M5373EVB.h
include/configs/astro_mcf5373l.h
include/configs/cobra5272.h

index 6d87908..ba2c228 100644 (file)
@@ -92,7 +92,7 @@ int watchdog_init(void)
        u32 wdog_module = 0;
 
        /* set timeout and enable watchdog */
-       wdog_module = ((CFG_SYS_CLK / CONFIG_SYS_HZ) * CONFIG_WATCHDOG_TIMEOUT);
+       wdog_module = ((CFG_SYS_CLK / CONFIG_SYS_HZ) * CONFIG_WATCHDOG_TIMEOUT_MSECS);
        wdog_module |= (wdog_module / 8192);
        out_be16(&wdp->mr, wdog_module);
 
index d21d82f..d7cbf11 100644 (file)
@@ -87,7 +87,7 @@ int watchdog_init(void)
 
        /* set timeout and enable watchdog */
        out_be16(&wdt->mr,
-               (CONFIG_WATCHDOG_TIMEOUT * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
+               (CONFIG_WATCHDOG_TIMEOUT_MSECS * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
 
        /* reset watchdog counter */
        out_be16(&wdt->sr, 0x5555);
@@ -253,7 +253,7 @@ int watchdog_init(void)
 
        /* set timeout and enable watchdog */
        out_be16(&wdt->wdog_wrrr,
-               (CONFIG_WATCHDOG_TIMEOUT * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
+               (CONFIG_WATCHDOG_TIMEOUT_MSECS * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
 
        /* reset watchdog counter */
        out_be16(&wdt->wdog_wcr, 0);
@@ -323,7 +323,7 @@ int watchdog_init(void)
 
        /* set timeout and enable watchdog */
        out_be16(&wdt->wmr,
-               (CONFIG_WATCHDOG_TIMEOUT * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
+               (CONFIG_WATCHDOG_TIMEOUT_MSECS * CONFIG_SYS_HZ) / (32768 * 1000) - 1);
 
        /* reset watchdog counter */
        out_be16(&wdt->wsr, 0x5555);
index 8a48d73..548cbca 100644 (file)
@@ -131,7 +131,7 @@ int watchdog_init(void)
        u32 wdog_module = 0;
 
        /* set timeout and enable watchdog */
-       wdog_module = ((CFG_SYS_CLK / 1000) * CONFIG_WATCHDOG_TIMEOUT);
+       wdog_module = ((CFG_SYS_CLK / 1000) * CONFIG_WATCHDOG_TIMEOUT_MSECS);
 #ifdef CONFIG_M5329
        out_be16(&wdp->mr, wdog_module / 8192);
 #else
index fd219cb..680c2d4 100644 (file)
@@ -43,3 +43,4 @@ CONFIG_SYS_MAX_FLASH_SECT=254
 CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index 1b7b156..c0087aa 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_SYS_MAX_FLASH_SECT=137
 CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index fffcddd..b099e98 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_SYS_MAX_FLASH_SECT=137
 CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index 5e7d401..a321b1c 100644 (file)
@@ -62,3 +62,4 @@ CONFIG_SYS_MAX_FLASH_SECT=137
 CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=10000
index 6586f04..32d1958 100644 (file)
@@ -49,3 +49,4 @@ CONFIG_MII=y
 CONFIG_MCFRTC=y
 CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index bf1d70f..9f0b419 100644 (file)
@@ -48,3 +48,4 @@ CONFIG_MII=y
 CONFIG_MCFRTC=y
 CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index b83b542..0538879 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_MII=y
 CONFIG_MCFRTC=y
 CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=5000
index 181f79b..90d8321 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_MII=y
 CONFIG_MCFRTC=y
 CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=3360
index afbcb86..9e5665a 100644 (file)
@@ -50,3 +50,4 @@ CONFIG_MCFRTC=y
 CONFIG_SYS_MCFRTC_BASE=0xFC0A8000
 CONFIG_MCFUART=y
 CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_TIMEOUT_MSECS=3355
index 246437a..b360238 100644 (file)
@@ -15,8 +15,6 @@
  */
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT                5000
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index 128ef50..ed45ecc 100644 (file)
@@ -20,8 +20,6 @@
 
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
-
 /* I2C */
 #define CFG_SYS_I2C_PINMUX_REG (gpio->par_qspi)
 #define CFG_SYS_I2C_PINMUX_CLR ~(GPIO_PAR_FECI2C_SCL_MASK | GPIO_PAR_FECI2C_SDA_MASK)
index 847b4c2..a9339e5 100644 (file)
@@ -19,8 +19,6 @@
 
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT 10000  /* timeout in milliseconds */
-
 #undef CONFIG_MONITOR_IS_IN_RAM        /* define if monitor is started from a pre-loader */
 
 /* Configuration for environment
index 0e9ba4c..42b74ae 100644 (file)
@@ -20,8 +20,6 @@
 
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT                5000
-
 #ifdef CONFIG_MCFFEC
 #      define CFG_SYS_TX_ETH_BUFFER    8
 #      define CFG_SYS_FEC_BUF_USE_SRAM
index 8f83810..72f0c63 100644 (file)
@@ -20,8 +20,6 @@
 
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT        5000    /* timeout in milliseconds, max timeout is 6.71sec */
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index 43c642e..4e8b54e 100644 (file)
@@ -22,8 +22,6 @@
 
 #define CFG_SYS_UART_PORT              (0)
 
-#define CONFIG_WATCHDOG_TIMEOUT        3360    /* timeout in ms, max is 3.36 sec */
-
 /* I2C */
 
 #ifdef CONFIG_MCFFEC
index f5922fc..62aa993 100644 (file)
 #define CFG_SYS_UART2_ALT3_GPIO
 
 /*
- * Watchdog configuration; Watchdog is disabled for running from RAM
- * and set to highest possible value else. Beware there is no check
- * in the watchdog code to validate the timeout value set here!
- */
-
-#ifndef CONFIG_MONITOR_IS_IN_RAM
-#define CONFIG_WATCHDOG_TIMEOUT 3355   /* timeout in milliseconds */
-#endif
-
-/*
  * Configuration for environment
  * Environment is located in the last sector of the flash
  */
index 01828ea..6d6e2fc 100644 (file)
 #define CFG_SYS_UART_PORT              (0)
 
 /* ---
- * set "#if 0" to "#if 1" if (Hardware)-WATCHDOG should be enabled & change
- * timeout acc. to your needs
- * #define CONFIG_WATCHDOG_TIMEOUT x , x is timeout in milliseconds, e. g. 10000
- * for 10 sec
- * ---
- */
-
-#if 0
-#define CONFIG_WATCHDOG_TIMEOUT 10000  /* timeout in milliseconds */
-#endif
-
-/* ---
  * CONFIG_MONITOR_IS_IN_RAM defines if u-boot is started from a different
  * bootloader residing in flash ('chainloading'); if you want to use
  * chainloading or want to compile a u-boot binary that can be loaded into