mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 20:51:39 +00:00
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@denx.de> Cc: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Suniel Mahesh <sunil.m@techveda.org>
This commit is contained in:
parent
41d185d142
commit
6874cb7220
7 changed files with 13 additions and 5 deletions
|
@ -700,7 +700,7 @@ static init_fnc_t init_sequence_r[] = {
|
||||||
stdio_init_tables,
|
stdio_init_tables,
|
||||||
initr_serial,
|
initr_serial,
|
||||||
initr_announce,
|
initr_announce,
|
||||||
#if defined(CONFIG_WDT)
|
#if CONFIG_IS_ENABLED(WDT)
|
||||||
initr_watchdog,
|
initr_watchdog,
|
||||||
#endif
|
#endif
|
||||||
INIT_FUNC_WATCHDOG_RESET
|
INIT_FUNC_WATCHDOG_RESET
|
||||||
|
|
|
@ -1061,6 +1061,7 @@ endif
|
||||||
|
|
||||||
config SPL_WATCHDOG_SUPPORT
|
config SPL_WATCHDOG_SUPPORT
|
||||||
bool "Support watchdog drivers"
|
bool "Support watchdog drivers"
|
||||||
|
imply SPL_WDT if !HW_WATCHDOG
|
||||||
help
|
help
|
||||||
Enable support for watchdog drivers in SPL. A watchdog is
|
Enable support for watchdog drivers in SPL. A watchdog is
|
||||||
typically a hardware peripheral which can reset the system when it
|
typically a hardware peripheral which can reset the system when it
|
||||||
|
|
|
@ -603,7 +603,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||||
spl_board_init();
|
spl_board_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_SPL_WATCHDOG_SUPPORT) && defined(CONFIG_WDT)
|
#if defined(CONFIG_SPL_WATCHDOG_SUPPORT) && CONFIG_IS_ENABLED(WDT)
|
||||||
initr_watchdog();
|
initr_watchdog();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -169,4 +169,11 @@ config WDT_TANGIER
|
||||||
Intel Tangier SoC. If you're using a board with Intel Tangier
|
Intel Tangier SoC. If you're using a board with Intel Tangier
|
||||||
SoC, say Y here.
|
SoC, say Y here.
|
||||||
|
|
||||||
|
config SPL_WDT
|
||||||
|
bool "Enable driver model for watchdog timer drivers in SPL"
|
||||||
|
depends on SPL_DM
|
||||||
|
help
|
||||||
|
Enable driver model for watchdog timer in SPL.
|
||||||
|
This is similar to CONFIG_WDT in U-Boot.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -15,7 +15,7 @@ obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o
|
||||||
obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
|
obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
|
||||||
obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
|
obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
|
||||||
obj-$(CONFIG_ULP_WATCHDOG) += ulp_wdog.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_SANDBOX) += sandbox_wdt.o
|
||||||
obj-$(CONFIG_WDT_ARMADA_37XX) += armada-37xx-wdt.o
|
obj-$(CONFIG_WDT_ARMADA_37XX) += armada-37xx-wdt.o
|
||||||
obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
|
obj-$(CONFIG_WDT_ASPEED) += ast_wdt.o
|
||||||
|
|
|
@ -137,7 +137,7 @@ typedef struct global_data {
|
||||||
#if defined(CONFIG_TRANSLATION_OFFSET)
|
#if defined(CONFIG_TRANSLATION_OFFSET)
|
||||||
fdt_addr_t translation_offset; /* optional translation offset */
|
fdt_addr_t translation_offset; /* optional translation offset */
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_WDT)
|
#if CONFIG_IS_ENABLED(WDT)
|
||||||
struct udevice *watchdog_dev;
|
struct udevice *watchdog_dev;
|
||||||
#endif
|
#endif
|
||||||
} gd_t;
|
} gd_t;
|
||||||
|
|
|
@ -106,7 +106,7 @@ struct wdt_ops {
|
||||||
int (*expire_now)(struct udevice *dev, ulong flags);
|
int (*expire_now)(struct udevice *dev, ulong flags);
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_WDT)
|
#if CONFIG_IS_ENABLED(WDT)
|
||||||
#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
|
#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS
|
||||||
#define CONFIG_WATCHDOG_TIMEOUT_MSECS (60 * 1000)
|
#define CONFIG_WATCHDOG_TIMEOUT_MSECS (60 * 1000)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue