aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-03 07:43:08 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 07:57:20 -0500
commitb56a7c6b36388b3eca887bd5d24f297e63e5bb5b (patch)
tree5f97c95382475d21a0f39d68f7b1be93c7dc6b22 /arch
parent7e3974b2f3e393abcf7934f020e26d3d22efa940 (diff)
ARM: restart: versatile: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-versatile/core.c13
-rw-r--r--arch/arm/mach-versatile/core.h1
-rw-r--r--arch/arm/mach-versatile/include/mach/system.h12
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c1
-rw-r--r--arch/arm/mach-versatile/versatile_dt.c1
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c1
6 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e340a54251df..b7a6a4b1a1de 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -745,6 +745,19 @@ static void versatile_leds_event(led_event_t ledevt)
745} 745}
746#endif /* CONFIG_LEDS */ 746#endif /* CONFIG_LEDS */
747 747
748void versatile_restart(char mode, const char *cmd)
749{
750 void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
751 u32 val;
752
753 val = __raw_readl(sys + VERSATILE_SYS_RESETCTL_OFFSET);
754 val |= 0x105;
755
756 __raw_writel(0xa05f, sys + VERSATILE_SYS_LOCK_OFFSET);
757 __raw_writel(val, sys + VERSATILE_SYS_RESETCTL_OFFSET);
758 __raw_writel(0, sys + VERSATILE_SYS_LOCK_OFFSET);
759}
760
748/* Early initializations */ 761/* Early initializations */
749void __init versatile_init_early(void) 762void __init versatile_init_early(void)
750{ 763{
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h
index e01422700ebb..2ef2f555f315 100644
--- a/arch/arm/mach-versatile/core.h
+++ b/arch/arm/mach-versatile/core.h
@@ -30,6 +30,7 @@ extern void __init versatile_init_early(void);
30extern void __init versatile_init_irq(void); 30extern void __init versatile_init_irq(void);
31extern void __init versatile_map_io(void); 31extern void __init versatile_map_io(void);
32extern struct sys_timer versatile_timer; 32extern struct sys_timer versatile_timer;
33extern void versatile_restart(char, const char *);
33extern unsigned int mmc_status(struct device *dev); 34extern unsigned int mmc_status(struct device *dev);
34#ifdef CONFIG_OF 35#ifdef CONFIG_OF
35extern struct of_dev_auxdata versatile_auxdata_lookup[]; 36extern struct of_dev_auxdata versatile_auxdata_lookup[];
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
index 8ffc12a7cb25..335946addf6f 100644
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ b/arch/arm/mach-versatile/include/mach/system.h
@@ -21,10 +21,6 @@
21#ifndef __ASM_ARCH_SYSTEM_H 21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H 22#define __ASM_ARCH_SYSTEM_H
23 23
24#include <linux/io.h>
25#include <mach/hardware.h>
26#include <mach/platform.h>
27
28static inline void arch_idle(void) 24static inline void arch_idle(void)
29{ 25{
30 /* 26 /*
@@ -36,14 +32,6 @@ static inline void arch_idle(void)
36 32
37static inline void arch_reset(char mode, const char *cmd) 33static inline void arch_reset(char mode, const char *cmd)
38{ 34{
39 u32 val;
40
41 val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
42 val |= 0x105;
43
44 __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
45 __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
46 __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
47} 35}
48 36
49#endif 37#endif
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index fda4866703cd..f1277ac92fac 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -41,4 +41,5 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
41 .init_irq = versatile_init_irq, 41 .init_irq = versatile_init_irq,
42 .timer = &versatile_timer, 42 .timer = &versatile_timer,
43 .init_machine = versatile_init, 43 .init_machine = versatile_init,
44 .restart = versatile_restart,
44MACHINE_END 45MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index 54e037c090f5..f48f2e4b667d 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -48,4 +48,5 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
48 .timer = &versatile_timer, 48 .timer = &versatile_timer,
49 .init_machine = versatile_dt_init, 49 .init_machine = versatile_dt_init,
50 .dt_compat = versatile_dt_match, 50 .dt_compat = versatile_dt_match,
51 .restart = versatile_restart,
51MACHINE_END 52MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index feaf9cbe60f6..839bea633821 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -109,4 +109,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
109 .init_irq = versatile_init_irq, 109 .init_irq = versatile_init_irq,
110 .timer = &versatile_timer, 110 .timer = &versatile_timer,
111 .init_machine = versatile_pb_init, 111 .init_machine = versatile_pb_init,
112 .restart = versatile_restart,
112MACHINE_END 113MACHINE_END