diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-28 16:45:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-29 10:25:02 +0200 |
commit | c142b3ff3df1fe847407cd969f9ebb627c54c85a (patch) | |
tree | d0182e5706bc9ec80081704c6830aad7631706ec /include | |
parent | 41d7d2fdc86b990843cb7c74eecda88baee0cac7 (diff) | |
download | barebox-c142b3ff3df1fe847407cd969f9ebb627c54c85a.tar.gz barebox-c142b3ff3df1fe847407cd969f9ebb627c54c85a.tar.xz |
power: reset: reboot-mode: support multi-word magic
The upstream binding and driver implementation only supports
reboot modes of 32-bit length. This is insufficient for cases where
multiple registers need to be written for the reboot mode to become
active. The i.MX6 is an example for this, the BootROM expects a second
32-bit register to indicate whether the reboot mode in the first is
valid. In preparation for adding support for this to the
syscon-reboot-mode driver. Migrate the reboot-mode core to support this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/reboot-mode.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h index bc57f1d72d..9d9ce19c0e 100644 --- a/include/linux/reboot-mode.h +++ b/include/linux/reboot-mode.h @@ -9,18 +9,19 @@ struct device_d; #ifdef CONFIG_REBOOT_MODE struct reboot_mode_driver { struct device_d *dev; - int (*write)(struct reboot_mode_driver *reboot, u32 magic); + int (*write)(struct reboot_mode_driver *reboot, const u32 *magic); int priority; bool no_fixup; /* filled by reboot_mode_register */ int reboot_mode_prev, reboot_mode_next; - unsigned nmodes; + unsigned nmodes, nelems; const char **modes; u32 *magics; }; -int reboot_mode_register(struct reboot_mode_driver *reboot, u32 reboot_mode); +int reboot_mode_register(struct reboot_mode_driver *reboot, + const u32 *magic, size_t num); const char *reboot_mode_get(void); #define REBOOT_MODE_DEFAULT_PRIORITY 100 |