ARM: restart: nomadik: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Nov 2011 10:48:02 +0000 (10:48 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:16 +0000 (12:57 +0000)
Hook the Nomadik NHK platform restart code into the new restart hook.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-nomadik/board-nhk8815.c
arch/arm/mach-nomadik/cpu-8815.c
arch/arm/mach-nomadik/cpu-8815.h
arch/arm/mach-nomadik/include/mach/system.h

index 4518050c8e8a20c59a8b038a521aa6b9dd6b21af..68c7b79bad790f2f5a134c1a958255cb3baf5a00 100644 (file)
@@ -284,4 +284,5 @@ MACHINE_START(NOMADIK, "NHK8815")
        .init_irq       = cpu8815_init_irq,
        .timer          = &nomadik_timer,
        .init_machine   = nhk8815_platform_init,
+       .restart        = cpu8815_restart,
 MACHINE_END
index c087ea9986a137d35db12a65b43296d1c6291d62..65df7b4fdd3ede7326d3ef0b747e642a269fe99e 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/device.h>
 #include <linux/amba/bus.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <plat/gpio-nomadik.h>
 #include <mach/hardware.h>
@@ -165,3 +166,13 @@ void __init cpu8815_init_irq(void)
 #endif
         return;
 }
+
+void cpu8815_restart(char mode, const char *cmd)
+{
+       void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);
+
+       /* FIXME: use egpio when implemented */
+
+       /* Write anything to Reset status register */
+       writel(1, src_rstsr);
+}
index e041794ac681d1730d862ce974f31682d5705212..71c21e8a11dc4897dbf551ad1e2b46fed357fb0c 100644 (file)
@@ -1,3 +1,4 @@
 extern void cpu8815_map_io(void);
 extern void cpu8815_platform_init(void);
 extern void cpu8815_init_irq(void);
+extern void cpu8815_restart(char, const char *);
index 7119f688116eecfc51dbcbf2fbcbe47a4324b6a3..16f59f67eee1819c652293192702ca07260f641b 100644 (file)
@@ -20,9 +20,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/hardware.h>
-
 static inline void arch_idle(void)
 {
        /*
@@ -34,12 +31,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       void __iomem *src_rstsr = io_p2v(NOMADIK_SRC_BASE + 0x18);
-
-       /* FIXME: use egpio when implemented */
-
-       /* Write anything to Reset status register */
-       writel(1, src_rstsr);
 }
 
 #endif