mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
watchdog: Handle SPL build with watchdog disabled
This patch adds some checks, so that the watchdog can be enabled in main U-Boot proper but can be disabled in SPL. This will be used by some AT91SAM based boards, which might enable the watchdog in the main U-Boot proper and not in SPL. It will be enabled in SPL by default there, so no need to configure it there. This approach saves some space in SPL. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Heiko Schocher <hs@denx.de> Tested on the taurus board: Tested-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
parent
e567dfb213
commit
7fbd42f5af
1 changed files with 8 additions and 2 deletions
|
@ -50,11 +50,17 @@ int init_func_watchdog_reset(void);
|
||||||
#if defined(CONFIG_WATCHDOG)
|
#if defined(CONFIG_WATCHDOG)
|
||||||
#if defined(__ASSEMBLY__)
|
#if defined(__ASSEMBLY__)
|
||||||
#define WATCHDOG_RESET bl watchdog_reset
|
#define WATCHDOG_RESET bl watchdog_reset
|
||||||
|
#else
|
||||||
|
/* Don't require the watchdog to be enabled in SPL */
|
||||||
|
#if defined(CONFIG_SPL_BUILD) && \
|
||||||
|
!defined(CONFIG_SPL_WATCHDOG_SUPPORT)
|
||||||
|
#define WATCHDOG_RESET() {}
|
||||||
#else
|
#else
|
||||||
extern void watchdog_reset(void);
|
extern void watchdog_reset(void);
|
||||||
|
|
||||||
#define WATCHDOG_RESET watchdog_reset
|
#define WATCHDOG_RESET watchdog_reset
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* No hardware or software watchdog.
|
* No hardware or software watchdog.
|
||||||
|
|
Loading…
Add table
Reference in a new issue