u-boot-brain/common/spl
Stefan Roese 06985289d4 watchdog: Implement generic watchdog_reset() version
This patch tries to implement a generic watchdog_reset() function that
can be used by all boards that want to service the watchdog device in
U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG.

Without this approach, new boards or platforms needed to implement a
board specific version of this functionality, mostly copy'ing the same
code over and over again into their board or platforms code base.

With this new generic function, the scattered other functions are now
removed to be replaced by the generic one. The new version also enables
the configuration of the watchdog timeout via the DT "timeout-sec"
property (if enabled via CONFIG_OF_CONTROL).

This patch also adds a new flag to the GD flags, to flag that the
watchdog is ready to use and adds the pointer to the watchdog device
to the GD. This enables us to remove the global "watchdog_dev"
variable, which was prone to cause problems because of its potentially
very early use in watchdog_reset(), even before the BSS is cleared.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Marek Behún" <marek.behun@nic.cz>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Maxim Sloyko <maxims@google.com>
Cc: Erik van Luijk <evanluijk@interact.nl>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Weijie Gao <weijie.gao@mediatek.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: Philippe Reynes <philippe.reynes@softathome.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu100)
2019-04-26 09:16:32 +02:00
..
Kconfig spl: implement CRC check on U-Boot uImage 2019-02-19 08:55:43 -05:00
Makefile usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE 2019-02-15 22:01:15 +01:00
spl_atf.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_bootrom.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_dfu.c env: common: accept flags on reset to default env 2018-07-19 16:17:58 -04:00
spl_ext.c spl: Weed out CONFIG_SYS_TEXT_BASE usage 2018-09-25 21:48:43 -04:00
spl_fat.c spl: Weed out CONFIG_SYS_TEXT_BASE usage 2018-09-25 21:48:43 -04:00
spl_fit.c common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled 2019-03-22 12:15:05 -04:00
spl_mmc.c spl: Kconfig: Replace CONFIG_SPL_EXT_SUPPORT to CONFIG_SPL_FS_EXT4 2019-02-01 09:14:21 -05:00
spl_nand.c spl: spl_nand.c: Add NAND loading message 2019-04-23 17:57:27 -04:00
spl_net.c spl: net: dm: usb: bind the gadget before attempting to load the image 2018-12-14 17:59:09 +01:00
spl_nor.c spl: nor: Skip CONFIG_SYS_FDT_BASE if not defined 2018-07-19 16:20:13 -04:00
spl_onenand.c spl: Weed out CONFIG_SYS_TEXT_BASE usage 2018-09-25 21:48:43 -04:00
spl_optee.S Rockchip-focused changes for v2018.11-rc2: 2018-10-05 13:40:42 -04:00
spl_ram.c spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU 2019-01-26 08:13:54 -05:00
spl_sata.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_sdp.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_spi.c dm: spi: Read default speed and mode values from DT 2019-04-12 11:54:50 +05:30
spl_ubi.c spl: Weed out CONFIG_SYS_TEXT_BASE usage 2018-09-25 21:48:43 -04:00
spl_usb.c usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE 2019-02-15 22:01:15 +01:00
spl_xip.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_ymodem.c spl: ymodem: Add support for loading full fitImages 2019-04-22 18:13:23 -04:00
spl.c watchdog: Implement generic watchdog_reset() version 2019-04-26 09:16:32 +02:00