1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-11 02:56:19 +01:00
Files
u-boot-megous/include
Rasmus Villemoes 492ee6b8d0 watchdog: wdt-uclass.c: handle all DM watchdogs in watchdog_reset()
A board can have and make use of more than one watchdog device, say
one built into the SOC and an external gpio-petted one. Having
wdt-uclass only handle the first is both a little arbitrary and
unexpected.

So change initr_watchdog() so we visit (probe) all DM watchdog
devices, and call the init_watchdog_dev helper for each.

Similarly let watchdog_reset() loop over the whole uclass - each
having their own ratelimiting metadata, and a separate "is this device
running" flag.

This gets rid of the watchdog_dev member of struct global_data.  We
do, however, still need the GD_FLG_WDT_READY set in
initr_watchdog(). This is because watchdog_reset() can get called
before DM is ready, and I don't think we can call uclass_get() that
early.

The current code just returns 0 if "getting" the first device fails -
that can of course happen because there are no devices, but it could
also happen if its ->probe call failed. In keeping with that, continue
with the handling of the remaining devices even if one fails to
probe. This is also why we cannot use uclass_probe_all().

If desired, it's possible to later add a per-device "u-boot,autostart"
boolean property, so that one can do CONFIG_WATCHDOG_AUTOSTART
per-device.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2021-08-31 12:04:03 +02:00
..
2021-06-17 09:40:57 +08:00
2019-12-06 16:44:20 -05:00
2019-10-16 05:42:27 +02:00
2021-07-23 13:36:20 -04:00
2020-05-11 10:16:49 +05:30
2021-01-15 14:36:12 -05:00
2021-01-25 21:52:00 +00:00
2021-01-25 21:52:00 +00:00
2021-07-21 10:27:35 -06:00
2020-05-18 17:33:33 -04:00
2021-01-12 10:58:04 +05:30
2020-12-26 12:37:28 +01:00
2021-07-23 13:36:20 -04:00
2021-01-30 14:25:42 -07:00
2021-06-18 10:09:41 +02:00
2019-04-23 20:26:43 -06:00
2020-02-05 19:33:46 -07:00
2019-10-13 23:34:43 +02:00
2020-08-03 22:19:54 -04:00
2020-05-18 21:19:23 -04:00
2021-04-16 17:32:34 -04:00
2021-07-07 19:52:22 -04:00
2021-04-10 08:04:42 -04:00
2021-02-10 10:00:51 +01:00
2020-10-30 10:56:11 -04:00
2020-05-18 17:33:33 -04:00
2020-06-12 13:14:07 -04:00
2021-08-30 14:13:28 -04:00
2019-10-14 09:31:41 +02:00
2020-01-20 15:38:16 +01:00
2021-08-06 08:26:48 -04:00
2019-11-07 18:39:16 -05:00
2021-06-11 16:34:52 +05:30
2020-05-18 18:36:55 -04:00
2019-08-11 16:43:41 -04:00
2020-04-17 12:32:36 -04:00
2021-06-07 10:48:40 -04:00
2019-12-02 18:23:11 -05:00
2021-06-23 08:45:03 -04:00
2021-08-30 14:13:28 -04:00
2021-06-24 11:54:07 +05:30
2020-07-17 10:47:19 -04:00
2021-07-06 05:22:41 +03:00
2021-07-07 19:52:24 -04:00
2021-04-12 17:44:55 -04:00
2020-06-14 21:07:20 +02:00
2020-02-05 19:33:46 -07:00
2020-06-14 21:07:20 +02:00
2020-07-09 06:02:44 +02:00
2020-09-30 11:55:23 -04:00
2020-02-05 19:33:46 -07:00
2021-03-27 15:04:31 +13:00
2021-01-05 16:20:26 -05:00
2019-05-21 17:33:23 -06:00
2020-10-22 09:54:53 -04:00
2020-08-03 22:19:54 -04:00
2021-01-27 17:03:16 -05:00
2021-01-15 14:36:12 -05:00