summaryrefslogtreecommitdiff
path: root/arch/arm/mach-u300/core.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-05 15:51:25 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 12:57:20 +0000
commit7e3974b2f3e393abcf7934f020e26d3d22efa940 (patch)
tree5e9a9b718e764765c6379ef518434e043a60c8c4 /arch/arm/mach-u300/core.c
parentabea3f2ce05f57e185b080e4a313f9fb519a0ecb (diff)
ARM: restart: u300: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset(). Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/core.c')
-rw-r--r--arch/arm/mach-u300/core.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index ac0791e924bc..27be5a794f62 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1888,3 +1888,24 @@ static int core_module_init(void)
return mmc_init(&mmcsd_device);
}
module_init(core_module_init);
+
+/* Forward declare this function from the watchdog */
+void coh901327_watchdog_reset(void);
+
+void u300_restart(char mode, const char *cmd)
+{
+ switch (mode) {
+ case 's':
+ case 'h':
+ printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
+#ifdef CONFIG_COH901327_WATCHDOG
+ coh901327_watchdog_reset();
+#endif
+ break;
+ default:
+ /* Do nothing */
+ break;
+ }
+ /* Wait for system do die/reset. */
+ while (1);
+}