diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-10-17 09:09:54 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-27 11:13:29 +0200 |
commit | 21dda946e7aa86246bf7ca22fb1a1609407c4bb9 (patch) | |
tree | f0d9175cf0387e7972b92927dbfcd30cd0d2ca54 /include | |
parent | 1c32f4eb396c20af8031df10b3239b32d3b64005 (diff) | |
download | barebox-21dda946e7aa86246bf7ca22fb1a1609407c4bb9.tar.gz barebox-21dda946e7aa86246bf7ca22fb1a1609407c4bb9.tar.xz |
restart: do restart-priority OF parsing in restart_handler_register
The restart-priority OF property is parsed for a number of MFDs, but
there is no reason really not to parse it for every restart handler that
has a device tree node like we already do for watchdogs.
Add a new struct restart_handler::of_node field and look into it if
populated. With this of_get_restart_priority, is no longer used, so drop it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221017071000.1458292-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/restart.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/restart.h b/include/restart.h index 27fab1b80d..330b50a53a 100644 --- a/include/restart.h +++ b/include/restart.h @@ -11,9 +11,12 @@ void restart_handlers_print(void); void __noreturn restart_machine(void); struct restart_handler *restart_handler_get_by_name(const char *name); +struct device_node; + struct restart_handler { void (*restart)(struct restart_handler *); int priority; + struct device_node *of_node; const char *name; struct list_head list; }; @@ -24,6 +27,4 @@ int restart_handler_register_fn(const char *name, #define RESTART_DEFAULT_PRIORITY 100 -unsigned int of_get_restart_priority(struct device_node *node); - #endif /* __INCLUDE_RESTART_H */ |