[U-Boot] [PATCH 1/2] watchdog: Split WDT from SPL_WDT
Peng Fan
peng.fan at nxp.com
Wed May 15 05:46:00 UTC 2019
> Subject: [U-Boot] [PATCH 1/2] watchdog: Split WDT from SPL_WDT
>
> Use CONFIG_IS_ENABLED(WDT) to permit use of WDT in SPL without DM,
> while the full U-Boot can use rich DM/DT WDT driver.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Peng Fan <Peng.Fan at freescale.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
> common/board_r.c | 2 +-
> common/spl/spl.c | 2 +-
> drivers/watchdog/Makefile | 2 +-
> include/asm-generic/global_data.h | 2 +-
> include/wdt.h | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/common/board_r.c b/common/board_r.c index
> 150e8cd424..988e40abb2 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -678,7 +678,7 @@ static init_fnc_t init_sequence_r[] = { #ifdef
> CONFIG_DM
> initr_dm,
> #endif
> -#if defined(CONFIG_WDT)
> +#if CONFIG_IS_ENABLED(WDT)
> initr_watchdog,
> #endif
> #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) ||
> defined(CONFIG_RISCV) || \ diff --git a/common/spl/spl.c
> b/common/spl/spl.c index 0a6a47c202..f22f854718 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -601,7 +601,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
> spl_board_init();
> #endif
>
> -#if defined(CONFIG_SPL_WATCHDOG_SUPPORT) && defined(CONFIG_WDT)
> +#if defined(CONFIG_SPL_WATCHDOG_SUPPORT) &&
> CONFIG_IS_ENABLED(WDT)
> initr_watchdog();
> #endif
>
> diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index
> 40b2f4bc66..4b94ae988c 100644
> --- a/drivers/watchdog/Makefile
> +++ b/drivers/watchdog/Makefile
> @@ -16,7 +16,7 @@ obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
> obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
> obj-$(CONFIG_TANGIER_WATCHDOG) += tangier_wdt.o
> obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.o
> -obj-$(CONFIG_WDT) += wdt-uclass.o
> +obj-$(CONFIG_$(SPL_TPL_)WDT) += wdt-uclass.o
> obj-$(CONFIG_WDT_SANDBOX) += sandbox_wdt.o
> obj-$(CONFIG_WDT_ARMADA_37XX) += armada-37xx-wdt.o
> obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
> diff --git a/include/asm-generic/global_data.h
> b/include/asm-generic/global_data.h
> index 02a3ed6838..7c2220643b 100644
> --- a/include/asm-generic/global_data.h
> +++ b/include/asm-generic/global_data.h
> @@ -137,7 +137,7 @@ typedef struct global_data { #if
> defined(CONFIG_TRANSLATION_OFFSET)
> fdt_addr_t translation_offset; /* optional translation offset */
> #endif
> -#if defined(CONFIG_WDT)
> +#if CONFIG_IS_ENABLED(WDT)
> struct udevice *watchdog_dev;
> #endif
> } gd_t;
> diff --git a/include/wdt.h b/include/wdt.h index aa77d3e9b4..5bcff24ab3
> 100644
> --- a/include/wdt.h
> +++ b/include/wdt.h
> @@ -106,7 +106,7 @@ struct wdt_ops {
> int (*expire_now)(struct udevice *dev, ulong flags); };
>
> -#if defined(CONFIG_WDT)
> +#if CONFIG_IS_ENABLED(WDT)
> #ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
> #define CONFIG_WATCHDOG_TIMEOUT_MSECS (60 * 1000)
> #endif
Reviewed-by: Peng Fan <peng.fan at nxp.com>
> --
> 2.20.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.d
> enx.de%2Flistinfo%2Fu-boot&data=02%7C01%7CPeng.Fan%40nxp.com
> %7C80a98d74e79849cca5bd08d6d721cb41%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C636932937538649220&sdata=JB4foxgQVteQw
> MUJrefgqegLm6N%2ByFq%2BfLknDE89nfo%3D&reserved=0
More information about the U-Boot
mailing list