]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: restart: u300: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 15:51:25 +0000 (15:51 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:20 +0000 (12:57 +0000)
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>
arch/arm/mach-u300/core.c
arch/arm/mach-u300/include/mach/platform.h
arch/arm/mach-u300/include/mach/system.h
arch/arm/mach-u300/u300.c

index ac0791e924bc06666f4644358d94606b1295641d..27be5a794f623254a075510a1050a63152dbd553 100644 (file)
@@ -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);
+}
index 77d9210a82e294f6c9d82e6ec535dd02ba382ddc..096333f32fc34eb791a61e8b593dc1933a231778 100644 (file)
@@ -14,6 +14,7 @@
 void u300_map_io(void);
 void u300_init_irq(void);
 void u300_init_devices(void);
+void u300_restart(char, const char *);
 extern struct sys_timer u300_timer;
 
 #endif
index 6b6fef7a438cde5bd1fa46084169167bb8b2031c..0ddf3cd367c3c861849f808e266087b653138e50 100644 (file)
@@ -8,33 +8,11 @@
  * System shutdown and reset functions.
  * Author: Linus Walleij <linus.walleij@stericsson.com>
  */
-#include <mach/hardware.h>
-#include <asm/io.h>
-#include <asm/hardware/vic.h>
-#include <asm/irq.h>
-
-/* Forward declare this function from the watchdog */
-void coh901327_watchdog_reset(void);
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
 }
 
-static void arch_reset(char mode, const char *cmd)
+static inline void arch_reset(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);
 }
index 89422ee7f3a8719d7edc0df21ccdbbd2710ea387..a75c9b83974880926ae84b1fc9920c89b5ec70d9 100644 (file)
@@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING)
        .init_irq       = u300_init_irq,
        .timer          = &u300_timer,
        .init_machine   = u300_init_machine,
+       .restart        = u300_restart,
 MACHINE_END