diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-10-17 09:09:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-27 11:13:29 +0200 |
commit | 1c33083a1542db3ea596481781170123f0d0510f (patch) | |
tree | 343fb3b2c38f2567604c6b2da06e6f342af207e6 /include/restart.h | |
parent | 21dda946e7aa86246bf7ca22fb1a1609407c4bb9 (diff) | |
download | barebox-1c33083a1542db3ea596481781170123f0d0510f.tar.gz |
restart: add reset -w for warm bootrom reset
We currently support reboot mode communication with BootROMs of the
i.MX6Q/DL, i.MX8MM and STM32MP15x. For each of these, the user must
take care to use the correct reset as the highest priority reset often
clears the non-volatile register mapped by the syscon holding the reboot
mode. As we only have one BootROM, we can improve usability by adding a
global flag that describes whether a restart handler is suitable for
use after a bootrom reboot mode write. Add a flag bit describing this
and allow populating it from the device tree as well as from drivers.
Existing i.MX/STM32 drivers will be moved onto this in follow-up
commits.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221017071000.1458292-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/restart.h')
-rw-r--r-- | include/restart.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/restart.h b/include/restart.h index 330b50a53a..15f30bb7ad 100644 --- a/include/restart.h +++ b/include/restart.h @@ -4,18 +4,21 @@ #include <linux/compiler.h> #include <linux/types.h> +#include <linux/bitops.h> struct device_node; void restart_handlers_print(void); void __noreturn restart_machine(void); -struct restart_handler *restart_handler_get_by_name(const char *name); +struct restart_handler *restart_handler_get_by_name(const char *name, int flags); struct device_node; struct restart_handler { void (*restart)(struct restart_handler *); int priority; +#define RESTART_FLAG_WARM_BOOTROM BIT(0) + int flags; struct device_node *of_node; const char *name; struct list_head list; |