[PATCH 0/4] Improved sysreset/watchdog uclass integration
Samuel Holland
samuel at sholland.org
Sun Aug 22 22:41:17 CEST 2021
This series hooks up the watchdog uclass to automatically register the
first watchdog device for use with sysreset, doing a bit of minor
cleanup along the way.
The goal is for this to replace the sunxi board-level non-DM reset_cpu()
function. I was surprised to find that the wdt_reboot driver requires
its own undocumented device tree node, which references the watchdog
device by phandle. This is problematic for us, because sunxi-u-boot.dtsi
file covers 20 different SoCs with varying watchdog node phandle names.
So it would have required adding a -u-boot.dtsi file for each board.
Hooking things up automatically makes sense to me; this is what Linux
does. (In fact, Linux does this for every watchdog device.) However, I
put the code behind a new option to avoid surprises for other platforms.
Samuel Holland (4):
sysreset: Add uclass Kconfig dependency to drivers
sysreset: Mark driver probe functions as static
sysreset: watchdog: Move watchdog reference to plat data
watchdog: Automatically register device with sysreset
drivers/sysreset/Kconfig | 11 ++++++--
drivers/sysreset/sysreset_resetctl.c | 2 +-
drivers/sysreset/sysreset_syscon.c | 2 +-
drivers/sysreset/sysreset_watchdog.c | 40 ++++++++++++++++++++++------
drivers/watchdog/wdt-uclass.c | 5 ++++
include/sysreset.h | 14 ++++++++++
6 files changed, 62 insertions(+), 12 deletions(-)
--
2.31.1
More information about the U-Boot
mailing list