mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 09:05:12 +07:00
4fcd504edb
This driver parses the reboot commands like "reboot bootloader" and "reboot recovery" to get a boot mode described in the device tree , then call the write interfae to store the boot mode in some place like special register or sram, which can be read by the bootloader after system reboot, then the bootloader can take different action according to the mode stored. This is commonly used on Android based devices, in order to reboot the device into fastboot or recovery mode. Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com> Tested-by: John Stultz <john.stultz@linaro.org> Acked-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
15 lines
372 B
C
15 lines
372 B
C
#ifndef __REBOOT_MODE_H__
|
|
#define __REBOOT_MODE_H__
|
|
|
|
struct reboot_mode_driver {
|
|
struct device *dev;
|
|
struct list_head head;
|
|
int (*write)(struct reboot_mode_driver *reboot, unsigned int magic);
|
|
struct notifier_block reboot_notifier;
|
|
};
|
|
|
|
int reboot_mode_register(struct reboot_mode_driver *reboot);
|
|
int reboot_mode_unregister(struct reboot_mode_driver *reboot);
|
|
|
|
#endif
|