power: reset: reboot-mode: treat unrecognized reboot mode as normal mode

Some bootloader will check the reboot mode to take different action, so
we treat unrecognized reboot mode as normal mode to prevent the system
run into abnormal case.

Change-Id: I88063a5b41e4e645443229fa490b2b55db5ccf27
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
Andy Yan
2019-10-22 17:11:40 +08:00
committed by Tao Huang
parent da7c615bc4
commit 081d4e9222

View File

@@ -61,6 +61,8 @@ static void reboot_mode_write(struct reboot_mode_driver *reboot,
int magic;
magic = get_reboot_mode_magic(reboot, cmd);
if (!magic)
magic = get_reboot_mode_magic(reboot, NULL);
if (magic)
reboot->write(reboot, magic);
}