]> Git Repo - J-u-boot.git/commit
watchdog: Implement generic watchdog_reset() version
authorStefan Roese <[email protected]>
Thu, 11 Apr 2019 13:58:44 +0000 (15:58 +0200)
committerStefan Roese <[email protected]>
Fri, 26 Apr 2019 07:16:32 +0000 (09:16 +0200)
commit06985289d452ad2423145cfed8cece61a7f8cec6
treea07d411de6bc792c34d20abe00efb440b4b5b92c
parent5edb9b2d713736d82e6529ecf04d8a44227944b5
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 <[email protected]>
Cc: Heiko Schocher <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: "Marek Behún" <[email protected]>
Cc: Daniel Schwierzeck <[email protected]>
Cc: Maxim Sloyko <[email protected]>
Cc: Erik van Luijk <[email protected]>
Cc: Ryder Lee <[email protected]>
Cc: Weijie Gao <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: "Álvaro Fernández Rojas" <[email protected]>
Cc: Philippe Reynes <[email protected]>
Cc: Christophe Leroy <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Tested-by: Michal Simek <[email protected]> (on zcu100)
14 files changed:
arch/mips/mach-mt7620/cpu.c
board/CZ.NIC/turris_mox/turris_mox.c
board/CZ.NIC/turris_omnia/turris_omnia.c
board/alliedtelesis/x530/x530.c
board/xilinx/microblaze-generic/microblaze-generic.c
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c
common/board_r.c
common/spl/spl.c
drivers/watchdog/Kconfig
drivers/watchdog/wdt-uclass.c
include/asm-generic/global_data.h
include/configs/turris_omnia.h
include/wdt.h
This page took 0.041618 seconds and 4 git commands to generate.