]> git.baikalelectronics.ru Git - kernel.git/commit
power: reset: add reboot mode driver
authorAndy Yan <andy.yan@rock-chips.com>
Wed, 6 Jul 2016 13:27:26 +0000 (21:27 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 6 Jul 2016 15:16:27 +0000 (17:16 +0200)
commit1faf0e2bf037e5af7d351d4eacf495b83a6f0e40
treeab115927f14c80b50a006fde4fd2924df363fc47
parente825686631cb3696f2e34e4fde0d2fdcdfdc1555
power: reset: add reboot mode driver

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>
drivers/power/reset/Kconfig
drivers/power/reset/Makefile
drivers/power/reset/reboot-mode.c [new file with mode: 0644]
drivers/power/reset/reboot-mode.h [new file with mode: 0644]
drivers/power/reset/syscon-reboot-mode.c [new file with mode: 0644]