ARM: 7266/1: restart: S3C64XX: use new restart hook
authorKukjin Kim <kgene.kim@samsung.com>
Tue, 3 Jan 2012 13:03:30 +0000 (14:03 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:18 +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>
14 files changed:
arch/arm/mach-s3c64xx/common.c
arch/arm/mach-s3c64xx/common.h
arch/arm/mach-s3c64xx/include/mach/system.h
arch/arm/mach-s3c64xx/mach-anw6410.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-hmt.c
arch/arm/mach-s3c64xx/mach-mini6410.c
arch/arm/mach-s3c64xx/mach-ncp.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s3c64xx/mach-smartq5.c
arch/arm/mach-s3c64xx/mach-smartq7.c
arch/arm/mach-s3c64xx/mach-smdk6400.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/plat-samsung/include/plat/watchdog-reset.h

index 8ae5b16cc4f5a2786c4b34c2a9a7ee5cf03962a4..35182ba049da43cb6c8bf221096924fc1aeb7330 100644 (file)
@@ -44,6 +44,7 @@
 #include <plat/irq-vic-timer.h>
 #include <plat/regs-irqtype.h>
 #include <plat/regs-serial.h>
+#include <plat/watchdog-reset.h>
 
 #include "common.h"
 
@@ -373,3 +374,12 @@ static int __init s3c64xx_init_irq_eint(void)
        return 0;
 }
 arch_initcall(s3c64xx_init_irq_eint);
+
+void s3c64xx_restart(char mode, const char *cmd)
+{
+       if (mode != 's')
+               arch_wdt_reset();
+
+       /* if all else fails, or mode was for soft, jump to 0 */
+       soft_restart(0);
+}
index 9f523a273274688370e80c615307b9f2ea380342..8dc8ab6d8d6d4e3d20bcf6b6bcf009ee9b2d853d 100644 (file)
@@ -23,6 +23,8 @@ void s3c64xx_init_io(struct map_desc *mach_desc, int size);
 void s3c64xx_register_clocks(unsigned long xtal, unsigned armclk_limit);
 void s3c64xx_setup_clocks(void);
 
+void s3c64xx_restart(char mode, const char *cmd);
+
 extern struct syscore_ops s3c64xx_irq_syscore_ops;
 extern struct sysdev_class s3c64xx_sysclass;
 
index d8ca5786ba251ea158e6c79b5eee95f49f35943e..51bc8eb046de2837eb781ebfe385817956b25b0d 100644 (file)
@@ -11,8 +11,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H __FILE__
 
-#include <plat/watchdog-reset.h>
-
 static void arch_idle(void)
 {
        /* nothing here yet */
@@ -20,11 +18,6 @@ static void arch_idle(void)
 
 static void arch_reset(char mode, const char *cmd)
 {
-       if (mode != 's')
-               arch_wdt_reset();
-
-       /* if all else fails, or mode was for soft, jump to 0 */
-       soft_restart(0);
 }
 
 #endif /* __ASM_ARCH_IRQ_H */
index 4949bcd554b7b259f4feb08844899536469f031f..a2ea6e5ee4652499d917241f20b64baffc1534aa 100644 (file)
@@ -240,4 +240,5 @@ MACHINE_START(ANW6410, "A&W6410")
        .map_io         = anw6410_map_io,
        .init_machine   = anw6410_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 954a44e0c32a98d6aa91c3acbe4bf4b7dd794ac9..3615d83d7b5a8fc3147447c4eed26a800059fed4 100644 (file)
@@ -715,4 +715,5 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
        .map_io         = crag6410_map_io,
        .init_machine   = crag6410_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index b6231d5b91586b7bb31bcaa1d924b49760c2649c..8707bee2f0d8a37d5e5b595e4b0a4029e22a0662 100644 (file)
@@ -271,4 +271,5 @@ MACHINE_START(HMT, "Airgoo-HMT")
        .map_io         = hmt_map_io,
        .init_machine   = hmt_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index ed02e7eebb97be6316b6ad5dc5d01d72164cf906..4fba2328a04b2e6ab28be9ea2828489e5c5bdf97 100644 (file)
@@ -349,4 +349,5 @@ MACHINE_START(MINI6410, "MINI6410")
        .map_io         = mini6410_map_io,
        .init_machine   = mini6410_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 3e2391a985706e1f1eff885f93bbf3996bf86ea9..9ec4d57107331e76c53c32e61330c5dc600aef38 100644 (file)
@@ -103,4 +103,5 @@ MACHINE_START(NCP, "NCP")
        .map_io         = ncp_map_io,
        .init_machine   = ncp_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 045614367f7f46ac2704cb45721c9983816171ba..0cb7116d7b59f694d36453e3ed766a4e31c7052f 100644 (file)
@@ -330,4 +330,5 @@ MACHINE_START(REAL6410, "REAL6410")
        .map_io         = real6410_map_io,
        .init_machine   = real6410_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 2044a9f2e4210c3853fd9aa3f109146ee7c02f98..f1f57bd5ce1c0699d3e4630caa84d8ba009e837e 100644 (file)
@@ -151,4 +151,5 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
        .map_io         = smartq_map_io,
        .init_machine   = smartq5_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index eaf24a35097b748d3fd6651631e6ad96ed249b5e..63117d84182ef4f26e36de4fd5d0fa780bdcc009 100644 (file)
@@ -167,4 +167,5 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
        .map_io         = smartq_map_io,
        .init_machine   = smartq7_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index bda5e0b26c5a23aab8939868c869c04f835c1392..64375d7dda5db51aa78f8f1e99e29e87957fe16e 100644 (file)
@@ -92,4 +92,5 @@ MACHINE_START(SMDK6400, "SMDK6400")
        .map_io         = smdk6400_map_io,
        .init_machine   = smdk6400_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 91087da9d7c2901097d2f77e0eee150135d5bcb1..f239b0a53a6ff5e40f25b364bafeccdf1704f98e 100644 (file)
@@ -704,4 +704,5 @@ MACHINE_START(SMDK6410, "SMDK6410")
        .map_io         = smdk6410_map_io,
        .init_machine   = smdk6410_machine_init,
        .timer          = &s3c24xx_timer,
+       .restart        = s3c64xx_restart,
 MACHINE_END
index 40dbb2b0ae22591d0f86271860f10269f90252c3..f19aff19205c3d4090c6d239f574c6d788ed8af6 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/delay.h>
 
 static inline void arch_wdt_reset(void)
 {