Commit ac15e00b authored by Russell King's avatar Russell King

ARM: restart: move reboot failure handing into machine_restart()

Move the failure to reboot into machine_restart() to always catch
this condition, even if a platform decides to hook the restarting
via arm_pm_restart().
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 34adeda9
...@@ -114,18 +114,8 @@ void arm_machine_restart(char mode, const char *cmd) ...@@ -114,18 +114,8 @@ void arm_machine_restart(char mode, const char *cmd)
/* Push out any further dirty data, and ensure cache is empty */ /* Push out any further dirty data, and ensure cache is empty */
flush_cache_all(); flush_cache_all();
/* /* Now call the architecture specific reboot code. */
* Now call the architecture specific reboot code.
*/
arch_reset(mode, cmd); arch_reset(mode, cmd);
/*
* Whoops - the architecture was unable to reboot.
* Tell the user!
*/
mdelay(1000);
printk("Reboot failed -- System halted\n");
while (1);
} }
/* /*
...@@ -250,7 +240,15 @@ void machine_power_off(void) ...@@ -250,7 +240,15 @@ void machine_power_off(void)
void machine_restart(char *cmd) void machine_restart(char *cmd)
{ {
machine_shutdown(); machine_shutdown();
arm_pm_restart(reboot_mode, cmd); arm_pm_restart(reboot_mode, cmd);
/* Give a grace period for failure to restart of 1s */
mdelay(1000);
/* Whoops - the platform was unable to reboot. Tell the user! */
printk("Reboot failed -- System halted\n");
while (1);
} }
void __show_regs(struct pt_regs *regs) void __show_regs(struct pt_regs *regs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment