]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: restart: prima2: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 10:23:27 +0000 (10:23 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:17 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Reviewed-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-prima2/common.h
arch/arm/mach-prima2/include/mach/system.h
arch/arm/mach-prima2/prima2.c
arch/arm/mach-prima2/rstc.c

index 83e5d2128118487d77a8c1215e1b4ee792a1645f..b28a930d4f8ad0e0cf2f54deec014d4233d00a16 100644 (file)
@@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;
 
 extern void __init sirfsoc_of_irq_init(void);
 extern void __init sirfsoc_of_clk_init(void);
+extern void sirfsoc_restart(char, const char *);
 
 #ifndef CONFIG_DEBUG_LL
 static inline void sirfsoc_map_lluart(void)  {}
index 0dbd257ad16d06856bae63e5da8920ea647e5d86..eb16b4bf570b30cee5623ae309a77b404b90ff02 100644 (file)
@@ -9,13 +9,6 @@
 #ifndef __MACH_SYSTEM_H__
 #define __MACH_SYSTEM_H__
 
-#include <linux/bitops.h>
-#include <mach/hardware.h>
-
-#define SIRFSOC_SYS_RST_BIT  BIT(31)
-
-extern void __iomem *sirfsoc_rstc_base;
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
@@ -23,7 +16,6 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
 }
 
 #endif
index a12b689a87026c9e06af50351b2b20d8c7e01d7d..02b9c05ff9905b5ca94d1f5672709fe68d6b8c5c 100644 (file)
@@ -40,4 +40,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
        .dma_zone_size  = SZ_256M,
        .init_machine   = sirfsoc_mach_init,
        .dt_compat      = prima2cb_dt_match,
+       .restart        = sirfsoc_restart,
 MACHINE_END
index 492cfa8d261073eac1d17498bee1af9123b77c00..762adb73ab7c9ece0de51b87f09cd6c5208f5576 100644 (file)
@@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)
 
        return 0;
 }
+
+#define SIRFSOC_SYS_RST_BIT  BIT(31)
+
+void sirfsoc_restart(char mode, const char *cmd)
+{
+       writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
+}