ARM: 7251/1: restart: S5PC100: use new restart hook
authorKukjin Kim <kgene.kim@samsung.com>
Thu, 22 Dec 2011 22:35:21 +0000 (23:35 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:19 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-s5pc100/common.c
arch/arm/mach-s5pc100/common.h
arch/arm/mach-s5pc100/mach-smdkc100.c

index e6eadacc108c245b6a64dc105402a207daa4d930..73594a2fcf267ac1d8305471ccf65791b7d80f05 100644 (file)
@@ -45,6 +45,7 @@
 #include <plat/iic-core.h>
 #include <plat/onenand-core.h>
 #include <plat/regs-serial.h>
+#include <plat/watchdog-reset.h>
 
 #include "common.h"
 
@@ -221,3 +222,11 @@ void __init s5pc100_init_uarts(struct s3c2410_uartcfg *cfg, int no)
 {
        s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
 }
+
+void s5pc100_restart(char mode, const char *cmd)
+{
+       if (mode != 's')
+               arch_wdt_reset();
+
+       soft_restart(0);
+}
index 4822b872a468d467737fb9b88bb47b2be4b90519..9fbd3ae2b4010923ab8b1fc8dc407641b8cbfd8e 100644 (file)
@@ -18,6 +18,8 @@ void s5pc100_init_irq(void);
 void s5pc100_register_clocks(void);
 void s5pc100_setup_clocks(void);
 
+void s5pc100_restart(char mode, const char *cmd);
+
 #ifdef CONFIG_CPU_S5PC100
 
 extern  int s5pc100_init(void);
index e1c41772c7bdb1fc112fdbdbe2030294b866fa85..ead292ce1e0d72f637a26c949ccb3d0ca9c59e9e 100644 (file)
@@ -254,4 +254,5 @@ MACHINE_START(SMDKC100, "SMDKC100")
        .map_io         = smdkc100_map_io,
        .init_machine   = smdkc100_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s5pc100_restart,
 MACHINE_END