u-boot-brain/drivers/watchdog
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
..
armada-37xx-wdt.c watchdog: armada_37xx: Fix compliance with kernel's driver 2019-01-21 11:39:49 +01:00
ast_wdt.c watchdog: Remove DM_FLAG_PRE_RELOC flag in various drivers 2018-11-14 09:16:28 -08:00
at91sam9_wdt.c arm: at91: Enable watchdog support 2019-04-09 09:28:50 +03:00
bcm2835_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm6345_wdt.c watchdog: bcm6345: switch to raw I/O functions 2019-02-09 07:50:50 -05:00
cdns_wdt.c watchdog: cadence: Do not stop wdt in probe 2018-07-19 10:49:56 +02:00
designware_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ftwdt010_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
imx_watchdog.c watchdog: imx: add config to disable wdog reset 2019-01-01 14:12:18 +01:00
Kconfig watchdog: Implement generic watchdog_reset() version 2019-04-26 09:16:32 +02:00
Makefile watchdog: driver support for fsl-lsch2 2019-01-01 14:12:18 +01:00
mpc8xx_wdt.c drivers: watchdog: add a DM driver for the MPC8xx watchdog 2018-12-03 10:44:10 -05:00
mt7621_wdt.c wdt: Add MT7621 watchdog driver 2018-11-18 16:02:22 +01:00
mtk_wdt.c watchdog: MediaTek: add watchdog driver for MediaTek SoCs 2018-11-28 23:04:52 -05:00
omap_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
orion_wdt.c watchdog: orion_wdt: take timeout value in ms 2019-04-12 07:04:18 +02:00
s5p_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tangier_wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ulp_wdog.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
wdt-uclass.c watchdog: Implement generic watchdog_reset() version 2019-04-26 09:16:32 +02:00
xilinx_tb_wdt.c watchdog: Convert Xilinx Axi watchdog driver to driver model 2018-07-19 10:49:55 +02:00