diff options
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r-- | arch/arm/mach-versatile/core.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-versatile/core.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-versatile/include/mach/system.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-versatile/versatile_ab.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-versatile/versatile_dt.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-versatile/versatile_pb.c | 1 |
6 files changed, 17 insertions, 16 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 4d8dfc15f3e6..cbcda61162d3 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -740,6 +740,19 @@ static void versatile_leds_event(led_event_t ledevt) | |||
740 | } | 740 | } |
741 | #endif /* CONFIG_LEDS */ | 741 | #endif /* CONFIG_LEDS */ |
742 | 742 | ||
743 | void versatile_restart(char mode, const char *cmd) | ||
744 | { | ||
745 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); | ||
746 | u32 val; | ||
747 | |||
748 | val = __raw_readl(sys + VERSATILE_SYS_RESETCTL_OFFSET); | ||
749 | val |= 0x105; | ||
750 | |||
751 | __raw_writel(0xa05f, sys + VERSATILE_SYS_LOCK_OFFSET); | ||
752 | __raw_writel(val, sys + VERSATILE_SYS_RESETCTL_OFFSET); | ||
753 | __raw_writel(0, sys + VERSATILE_SYS_LOCK_OFFSET); | ||
754 | } | ||
755 | |||
743 | /* Early initializations */ | 756 | /* Early initializations */ |
744 | void __init versatile_init_early(void) | 757 | void __init versatile_init_early(void) |
745 | { | 758 | { |
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); | |||
30 | extern void __init versatile_init_irq(void); | 30 | extern void __init versatile_init_irq(void); |
31 | extern void __init versatile_map_io(void); | 31 | extern void __init versatile_map_io(void); |
32 | extern struct sys_timer versatile_timer; | 32 | extern struct sys_timer versatile_timer; |
33 | extern void versatile_restart(char, const char *); | ||
33 | extern unsigned int mmc_status(struct device *dev); | 34 | extern unsigned int mmc_status(struct device *dev); |
34 | #ifdef CONFIG_OF | 35 | #ifdef CONFIG_OF |
35 | extern struct of_dev_auxdata versatile_auxdata_lookup[]; | 36 | extern 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..f3fa347895f0 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 | |||
28 | static inline void arch_idle(void) | 24 | static inline void arch_idle(void) |
29 | { | 25 | { |
30 | /* | 26 | /* |
@@ -34,16 +30,4 @@ static inline void arch_idle(void) | |||
34 | cpu_do_idle(); | 30 | cpu_do_idle(); |
35 | } | 31 | } |
36 | 32 | ||
37 | static inline void arch_reset(char mode, const char *cmd) | ||
38 | { | ||
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 | } | ||
48 | |||
49 | #endif | 33 | #endif |
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c index c83a1f379f7a..63b8dd2b9f4d 100644 --- a/arch/arm/mach-versatile/versatile_ab.c +++ b/arch/arm/mach-versatile/versatile_ab.c | |||
@@ -43,4 +43,5 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") | |||
43 | .handle_irq = vic_handle_irq, | 43 | .handle_irq = vic_handle_irq, |
44 | .timer = &versatile_timer, | 44 | .timer = &versatile_timer, |
45 | .init_machine = versatile_init, | 45 | .init_machine = versatile_init, |
46 | .restart = versatile_restart, | ||
46 | MACHINE_END | 47 | MACHINE_END |
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index f4d1e0f072c8..ae5ad3c8f3dd 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c | |||
@@ -50,4 +50,5 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)") | |||
50 | .timer = &versatile_timer, | 50 | .timer = &versatile_timer, |
51 | .init_machine = versatile_dt_init, | 51 | .init_machine = versatile_dt_init, |
52 | .dt_compat = versatile_dt_match, | 52 | .dt_compat = versatile_dt_match, |
53 | .restart = versatile_restart, | ||
53 | MACHINE_END | 54 | MACHINE_END |
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 4d31eeb6c101..7aab79b665e7 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c | |||
@@ -111,4 +111,5 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") | |||
111 | .handle_irq = vic_handle_irq, | 111 | .handle_irq = vic_handle_irq, |
112 | .timer = &versatile_timer, | 112 | .timer = &versatile_timer, |
113 | .init_machine = versatile_pb_init, | 113 | .init_machine = versatile_pb_init, |
114 | .restart = versatile_restart, | ||
114 | MACHINE_END | 115 | MACHINE_END |