u-boot/arch/mips
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
..
cpu linker: Modify linker scripts to be more generic 2019-01-26 22:55:53 -05:00
dts dt: bcm968380gerg: enable nand controller 2019-04-22 11:56:29 -04:00
include/asm mips: Add SPL header 2018-12-19 15:23:01 +01:00
lib bootm: mips: Remove boot_reloc_ramdisk 2019-04-12 17:32:50 +02:00
mach-ath79 mips: add initial support for qca956x referenced board 2019-04-12 17:32:50 +02:00
mach-bmips bmips: swapping IO space isn't required 2018-12-10 18:46:45 +01:00
mach-jz47xx MIPS: jz47xx: remove custom u-boot-spl.lds 2019-01-16 13:56:43 +01:00
mach-mscc net: Add MSCC ServalT network driver. 2019-04-12 17:32:52 +02:00
mach-mt7620 watchdog: Implement generic watchdog_reset() version 2019-04-26 09:16:32 +02:00
mach-pic32 Kconfig: Sort bool, default, select and imply options 2018-07-30 07:18:48 -04:00
config.mk MIPS: fix linking of standalone programs 2018-11-18 16:02:23 +01:00
Kconfig mips: jz47xx: Add JZ4780 SoC support 2018-12-19 15:23:01 +01:00
Makefile mips: jz47xx: Add JZ4780 SoC support 2018-12-19 15:23:01 +01:00
Makefile.postlink SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00