Commit cb15dff4 authored by Russell King's avatar Russell King

ARM: restart: kirkwood: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d1b860fb
...@@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void) ...@@ -534,3 +534,19 @@ static int __init kirkwood_clock_gate(void)
return 0; return 0;
} }
late_initcall(kirkwood_clock_gate); late_initcall(kirkwood_clock_gate);
void kirkwood_restart(char mode, const char *cmd)
{
/*
* Enable soft reset to assert RSTOUTn.
*/
writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
/*
* Assert soft reset.
*/
writel(SOFT_RESET, SYSTEM_SOFT_RESET);
while (1)
;
}
...@@ -50,6 +50,7 @@ void kirkwood_uart1_init(void); ...@@ -50,6 +50,7 @@ void kirkwood_uart1_init(void);
void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay); void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *)); void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
void kirkwood_audio_init(void); void kirkwood_audio_init(void);
void kirkwood_restart(char, const char *);
extern int kirkwood_tclk; extern int kirkwood_tclk;
extern struct sys_timer kirkwood_timer; extern struct sys_timer kirkwood_timer;
......
...@@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2") ...@@ -227,4 +227,5 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board") ...@@ -103,4 +103,5 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar") ...@@ -108,4 +108,5 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board") ...@@ -127,4 +127,5 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#ifndef __ASM_ARCH_SYSTEM_H #ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H
#include <mach/bridge-regs.h>
static inline void arch_idle(void) static inline void arch_idle(void)
{ {
cpu_do_idle(); cpu_do_idle();
...@@ -18,19 +16,6 @@ static inline void arch_idle(void) ...@@ -18,19 +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)
{ {
/*
* Enable soft reset to assert RSTOUTn.
*/
writel(SOFT_RESET_OUT_EN, RSTOUTn_MASK);
/*
* Assert soft reset.
*/
writel(SOFT_RESET, SYSTEM_SOFT_RESET);
while (1)
;
} }
#endif #endif
...@@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board") ...@@ -169,4 +169,5 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2") ...@@ -264,6 +264,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2") ...@@ -275,6 +276,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2") ...@@ -286,5 +288,6 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2") ...@@ -405,6 +405,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2") ...@@ -416,5 +417,6 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board") ...@@ -220,6 +220,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board") ...@@ -232,6 +233,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board") ...@@ -244,5 +246,6 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board") ...@@ -85,4 +85,5 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board") ...@@ -121,4 +121,5 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") ...@@ -144,6 +144,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") ...@@ -155,5 +156,6 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client") ...@@ -207,4 +207,5 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219") ...@@ -138,4 +138,5 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_restart,
MACHINE_END MACHINE_END
...@@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x") ...@@ -182,4 +182,5 @@ MACHINE_START(TS41X, "QNAP TS-41x")
.init_early = kirkwood_init_early, .init_early = kirkwood_init_early,
.init_irq = kirkwood_init_irq, .init_irq = kirkwood_init_irq,
.timer = &kirkwood_timer, .timer = &kirkwood_timer,
.restart = kirkwood_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