Commit 125c4033 authored by Russell King's avatar Russell King

ARM: restart: prima2: use new restart hook

Hook these platforms restart code into the new restart hook rather
than using arch_reset().
Reviewed-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a1c1cee9
...@@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer; ...@@ -16,6 +16,7 @@ extern struct sys_timer sirfsoc_timer;
extern void __init sirfsoc_of_irq_init(void); extern void __init sirfsoc_of_irq_init(void);
extern void __init sirfsoc_of_clk_init(void); extern void __init sirfsoc_of_clk_init(void);
extern void sirfsoc_restart(char, const char *);
#ifndef CONFIG_DEBUG_LL #ifndef CONFIG_DEBUG_LL
static inline void sirfsoc_map_lluart(void) {} static inline void sirfsoc_map_lluart(void) {}
......
...@@ -9,13 +9,6 @@ ...@@ -9,13 +9,6 @@
#ifndef __MACH_SYSTEM_H__ #ifndef __MACH_SYSTEM_H__
#define __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) static inline void arch_idle(void)
{ {
cpu_do_idle(); cpu_do_idle();
...@@ -23,7 +16,6 @@ static inline void arch_idle(void) ...@@ -23,7 +16,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)
{ {
writel(SIRFSOC_SYS_RST_BIT, sirfsoc_rstc_base);
} }
#endif #endif
...@@ -40,4 +40,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb") ...@@ -40,4 +40,5 @@ MACHINE_START(PRIMA2_EVB, "prima2cb")
.dma_zone_size = SZ_256M, .dma_zone_size = SZ_256M,
.init_machine = sirfsoc_mach_init, .init_machine = sirfsoc_mach_init,
.dt_compat = prima2cb_dt_match, .dt_compat = prima2cb_dt_match,
.restart = sirfsoc_restart,
MACHINE_END MACHINE_END
...@@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev) ...@@ -68,3 +68,10 @@ int sirfsoc_reset_device(struct device *dev)
return 0; 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);
}
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