Commit 47cacdd4 authored by Russell King's avatar Russell King

ARM: restart: realview: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 271a74fc
...@@ -65,6 +65,5 @@ extern int realview_usb_register(struct resource *res); ...@@ -65,6 +65,5 @@ extern int realview_usb_register(struct resource *res);
extern void realview_init_early(void); extern void realview_init_early(void);
extern void realview_fixup(struct tag *tags, char **from, extern void realview_fixup(struct tag *tags, char **from,
struct meminfo *meminfo); struct meminfo *meminfo);
extern void (*realview_reset)(char);
#endif #endif
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
#ifndef __ASM_ARCH_SYSTEM_H #ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H
#include <linux/io.h>
#include <mach/hardware.h>
#include <mach/platform.h>
void (*realview_reset)(char mode);
static inline void arch_idle(void) static inline void arch_idle(void)
{ {
/* /*
...@@ -38,13 +32,6 @@ static inline void arch_idle(void) ...@@ -38,13 +32,6 @@ static inline void arch_idle(void)
static inline void arch_reset(char mode, const char *cmd) static inline void arch_reset(char mode, const char *cmd)
{ {
/*
* To reset, we hit the on-board reset register
* in the system FPGA
*/
if (realview_reset)
realview_reset(mode);
dsb();
} }
#endif #endif
...@@ -415,7 +415,7 @@ static struct sys_timer realview_eb_timer = { ...@@ -415,7 +415,7 @@ static struct sys_timer realview_eb_timer = {
.init = realview_eb_timer_init, .init = realview_eb_timer_init,
}; };
static void realview_eb_reset(char mode) static void realview_eb_restart(char mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
...@@ -427,6 +427,7 @@ static void realview_eb_reset(char mode) ...@@ -427,6 +427,7 @@ static void realview_eb_reset(char mode)
__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
if (core_tile_eb11mp()) if (core_tile_eb11mp())
__raw_writel(0x0008, reset_ctrl); __raw_writel(0x0008, reset_ctrl);
dsb();
} }
static void __init realview_eb_init(void) static void __init realview_eb_init(void)
...@@ -458,7 +459,6 @@ static void __init realview_eb_init(void) ...@@ -458,7 +459,6 @@ static void __init realview_eb_init(void)
#ifdef CONFIG_LEDS #ifdef CONFIG_LEDS
leds_event = realview_leds_event; leds_event = realview_leds_event;
#endif #endif
realview_reset = realview_eb_reset;
} }
MACHINE_START(REALVIEW_EB, "ARM-RealView EB") MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
...@@ -473,4 +473,5 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") ...@@ -473,4 +473,5 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
#endif #endif
.restart = realview_eb_restart,
MACHINE_END MACHINE_END
...@@ -336,12 +336,13 @@ static struct sys_timer realview_pb1176_timer = { ...@@ -336,12 +336,13 @@ static struct sys_timer realview_pb1176_timer = {
.init = realview_pb1176_timer_init, .init = realview_pb1176_timer_init,
}; };
static void realview_pb1176_reset(char mode) static void realview_pb1176_restart(char mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
__raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl); __raw_writel(REALVIEW_PB1176_SYS_SOFT_RESET, reset_ctrl);
dsb();
} }
static void realview_pb1176_fixup(struct tag *tags, char **from, static void realview_pb1176_fixup(struct tag *tags, char **from,
...@@ -381,7 +382,6 @@ static void __init realview_pb1176_init(void) ...@@ -381,7 +382,6 @@ static void __init realview_pb1176_init(void)
#ifdef CONFIG_LEDS #ifdef CONFIG_LEDS
leds_event = realview_leds_event; leds_event = realview_leds_event;
#endif #endif
realview_reset = realview_pb1176_reset;
} }
MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
...@@ -396,4 +396,5 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") ...@@ -396,4 +396,5 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
#endif #endif
.restart = realview_pb1176_restart,
MACHINE_END MACHINE_END
...@@ -315,7 +315,7 @@ static struct sys_timer realview_pb11mp_timer = { ...@@ -315,7 +315,7 @@ static struct sys_timer realview_pb11mp_timer = {
.init = realview_pb11mp_timer_init, .init = realview_pb11mp_timer_init,
}; };
static void realview_pb11mp_reset(char mode) static void realview_pb11mp_restart(char mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
...@@ -327,6 +327,7 @@ static void realview_pb11mp_reset(char mode) ...@@ -327,6 +327,7 @@ static void realview_pb11mp_reset(char mode)
__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
__raw_writel(0x0000, reset_ctrl); __raw_writel(0x0000, reset_ctrl);
__raw_writel(0x0004, reset_ctrl); __raw_writel(0x0004, reset_ctrl);
dsb();
} }
static void __init realview_pb11mp_init(void) static void __init realview_pb11mp_init(void)
...@@ -355,7 +356,6 @@ static void __init realview_pb11mp_init(void) ...@@ -355,7 +356,6 @@ static void __init realview_pb11mp_init(void)
#ifdef CONFIG_LEDS #ifdef CONFIG_LEDS
leds_event = realview_leds_event; leds_event = realview_leds_event;
#endif #endif
realview_reset = realview_pb11mp_reset;
} }
MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
...@@ -370,4 +370,5 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") ...@@ -370,4 +370,5 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
#endif #endif
.restart = realview_pb11mp_restart,
MACHINE_END MACHINE_END
...@@ -271,7 +271,7 @@ static struct sys_timer realview_pba8_timer = { ...@@ -271,7 +271,7 @@ static struct sys_timer realview_pba8_timer = {
.init = realview_pba8_timer_init, .init = realview_pba8_timer_init,
}; };
static void realview_pba8_reset(char mode) static void realview_pba8_restart(char mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
...@@ -283,6 +283,7 @@ static void realview_pba8_reset(char mode) ...@@ -283,6 +283,7 @@ static void realview_pba8_reset(char mode)
__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
__raw_writel(0x0000, reset_ctrl); __raw_writel(0x0000, reset_ctrl);
__raw_writel(0x0004, reset_ctrl); __raw_writel(0x0004, reset_ctrl);
dsb();
} }
static void __init realview_pba8_init(void) static void __init realview_pba8_init(void)
...@@ -305,7 +306,6 @@ static void __init realview_pba8_init(void) ...@@ -305,7 +306,6 @@ static void __init realview_pba8_init(void)
#ifdef CONFIG_LEDS #ifdef CONFIG_LEDS
leds_event = realview_leds_event; leds_event = realview_leds_event;
#endif #endif
realview_reset = realview_pba8_reset;
} }
MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
...@@ -320,4 +320,5 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") ...@@ -320,4 +320,5 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
#endif #endif
.restart = realview_pba8_restart,
MACHINE_END MACHINE_END
...@@ -339,7 +339,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from, ...@@ -339,7 +339,7 @@ static void realview_pbx_fixup(struct tag *tags, char **from,
#endif #endif
} }
static void realview_pbx_reset(char mode) static void realview_pbx_restart(char mode, const char *cmd)
{ {
void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK); void __iomem *lock_ctrl = __io_address(REALVIEW_SYS_LOCK);
...@@ -351,6 +351,7 @@ static void realview_pbx_reset(char mode) ...@@ -351,6 +351,7 @@ static void realview_pbx_reset(char mode)
__raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl); __raw_writel(REALVIEW_SYS_LOCK_VAL, lock_ctrl);
__raw_writel(0x00F0, reset_ctrl); __raw_writel(0x00F0, reset_ctrl);
__raw_writel(0x00F4, reset_ctrl); __raw_writel(0x00F4, reset_ctrl);
dsb();
} }
static void __init realview_pbx_init(void) static void __init realview_pbx_init(void)
...@@ -388,7 +389,6 @@ static void __init realview_pbx_init(void) ...@@ -388,7 +389,6 @@ static void __init realview_pbx_init(void)
#ifdef CONFIG_LEDS #ifdef CONFIG_LEDS
leds_event = realview_leds_event; leds_event = realview_leds_event;
#endif #endif
realview_reset = realview_pbx_reset;
} }
MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
...@@ -403,4 +403,5 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") ...@@ -403,4 +403,5 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
#ifdef CONFIG_ZONE_DMA #ifdef CONFIG_ZONE_DMA
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
#endif #endif
.restart = realview_pbx_restart,
MACHINE_END MACHINE_END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment