summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-09-28 16:45:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-29 10:25:02 +0200
commitc142b3ff3df1fe847407cd969f9ebb627c54c85a (patch)
treed0182e5706bc9ec80081704c6830aad7631706ec /include
parent41d7d2fdc86b990843cb7c74eecda88baee0cac7 (diff)
downloadbarebox-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.h7
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