watchdog: Integrate watchdog triggering into the cyclic framework
This patch integrates the watchdog triggering into the recently added
cyclic infrastructure. Each watchdog device that shall be triggered
registers it's own cyclic function. This way, multiple watchdog devices
are still supported, each via a cyclic function with separate trigger
intervals.
Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 50e6a1e..e55deaf 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -3,6 +3,7 @@
config WATCHDOG
bool "Enable U-Boot watchdog reset"
depends on !HW_WATCHDOG
+ select CYCLIC
help
This option enables U-Boot watchdog support where U-Boot is using
watchdog_reset function to service watchdog device in U-Boot. Enable
@@ -74,6 +75,7 @@
bool "Enable driver model for watchdog timer drivers"
depends on DM
imply WATCHDOG
+ select CYCLIC
help
Enable driver model for watchdog timer. At the moment the API
is very simple and only supports four operations: