sysreset: watchdog: Move watchdog reference to plat data
authorSamuel Holland <samuel@sholland.org>
Thu, 4 Nov 2021 03:55:13 +0000 (22:55 -0500)
committerStefan Roese <sr@denx.de>
Thu, 4 Nov 2021 07:57:19 +0000 (08:57 +0100)
commit5544a0114258ec4eba2a361fc975e91c419b227e
tree539eaa9dbaef8fcffecd1827b54ce425a40cc5e5
parent30ba45dbd6f3a470c739bd5db0663bee86b4cbf6
sysreset: watchdog: Move watchdog reference to plat data

Currently, the wdt_reboot driver always gets its watchdog device
reference from an OF node. This prevents selecting a watchdog at
runtime. Move the watchdog device reference to the plat data, so
the driver can be bound with the reference pre-provided. The
reference will still be acquired from the OF node if it is not
already provided.

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/sysreset/sysreset_watchdog.c