]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: Use sysreset framework for poweroff/reset
authorSamuel Holland <samuel@sholland.org>
Thu, 4 Nov 2021 03:55:16 +0000 (22:55 -0500)
committerStefan Roese <sr@denx.de>
Thu, 4 Nov 2021 07:57:19 +0000 (08:57 +0100)
Instead of hardcoding the watchdog for reset, and the PMIC for poweroff,
use the sysreset framework to manage the available poweroff/reset
backends. This allows (as examples) using the PMIC to do a cold reset,
and using a GPIO to power off H3/H5 boards lacking a PMIC. Furthermore,
it removes the need to hardcode watchdog MMIO addresses, since the
sysreset backends can be discovered using the device tree.

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/Kconfig

index b4808d4c752f45029be7b28a8663aa27af12acda..ae911d6e3542f9b5980bc31b4ad112a6e69d8eb5 100644 (file)
@@ -1084,6 +1084,9 @@ config ARCH_SUNXI
        imply SPL_MMC if MMC
        imply SPL_POWER
        imply SPL_SERIAL
+       imply SYSRESET
+       imply SYSRESET_WATCHDOG
+       imply SYSRESET_WATCHDOG_AUTO
        imply USB_GADGET
        imply WDT