From 38bd7493aa37d72bfa57dfd4e7e34ae6ade2697c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 29 Sep 2011 13:18:29 -0500 Subject: ARM: versatile: remove overlapping map_desc entry The map_desc for VERSATILE_GPIO0_BASE overlaps with VERSATILE_SCTL_BASE. The overlapping entry can be removed. Signed-off-by: Rob Herring Signed-off-by: Nicolas Pitre --- arch/arm/mach-versatile/core.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch/arm/mach-versatile/core.c') diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index e340a54251df..4d8dfc15f3e6 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -141,11 +141,6 @@ static struct map_desc versatile_io_desc[] __initdata = { }, #ifdef CONFIG_MACH_VERSATILE_AB { - .virtual = IO_ADDRESS(VERSATILE_GPIO0_BASE), - .pfn = __phys_to_pfn(VERSATILE_GPIO0_BASE), - .length = SZ_4K, - .type = MT_DEVICE - }, { .virtual = IO_ADDRESS(VERSATILE_IB2_BASE), .pfn = __phys_to_pfn(VERSATILE_IB2_BASE), .length = SZ_64M, -- cgit v1.2.3 From b56a7c6b36388b3eca887bd5d24f297e63e5bb5b Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 3 Nov 2011 11:43:08 +0000 Subject: 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 --- arch/arm/mach-versatile/core.c | 13 +++++++++++++ arch/arm/mach-versatile/core.h | 1 + arch/arm/mach-versatile/include/mach/system.h | 12 ------------ arch/arm/mach-versatile/versatile_ab.c | 1 + arch/arm/mach-versatile/versatile_dt.c | 1 + arch/arm/mach-versatile/versatile_pb.c | 1 + 6 files changed, 17 insertions(+), 12 deletions(-) (limited to 'arch/arm/mach-versatile/core.c') 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) } #endif /* CONFIG_LEDS */ +void versatile_restart(char mode, const char *cmd) +{ + void __iomem *sys = __io_address(VERSATILE_SYS_BASE); + u32 val; + + val = __raw_readl(sys + VERSATILE_SYS_RESETCTL_OFFSET); + val |= 0x105; + + __raw_writel(0xa05f, sys + VERSATILE_SYS_LOCK_OFFSET); + __raw_writel(val, sys + VERSATILE_SYS_RESETCTL_OFFSET); + __raw_writel(0, sys + VERSATILE_SYS_LOCK_OFFSET); +} + /* Early initializations */ void __init versatile_init_early(void) { 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); extern void __init versatile_init_irq(void); extern void __init versatile_map_io(void); extern struct sys_timer versatile_timer; +extern void versatile_restart(char, const char *); extern unsigned int mmc_status(struct device *dev); #ifdef CONFIG_OF 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..335946addf6f 100644 --- a/arch/arm/mach-versatile/include/mach/system.h +++ b/arch/arm/mach-versatile/include/mach/system.h @@ -21,10 +21,6 @@ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H -#include -#include -#include - static inline void arch_idle(void) { /* @@ -36,14 +32,6 @@ static inline void arch_idle(void) static inline void arch_reset(char mode, const char *cmd) { - u32 val; - - val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7; - val |= 0x105; - - __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK)); - __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL)); - __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK)); } #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") .init_irq = versatile_init_irq, .timer = &versatile_timer, .init_machine = versatile_init, + .restart = versatile_restart, MACHINE_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)") .timer = &versatile_timer, .init_machine = versatile_dt_init, .dt_compat = versatile_dt_match, + .restart = versatile_restart, MACHINE_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") .init_irq = versatile_init_irq, .timer = &versatile_timer, .init_machine = versatile_pb_init, + .restart = versatile_restart, MACHINE_END -- cgit v1.2.3