Commit 764cbcc2 authored by Russell King's avatar Russell King

ARM: restart: orion5x: use new restart hook

Hook these platforms restart code into the new restart hook rather than
using arch_reset().

In addition, convert calls to arm_machine_restart() to orion5x_restart()
to ensure that they continue to work as intended.
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent baa95883
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/mv643xx_i2c.h> #include <linux/mv643xx_i2c.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/delay.h>
#include <net/dsa.h> #include <net/dsa.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/setup.h> #include <asm/setup.h>
...@@ -304,6 +305,17 @@ void __init orion5x_init(void) ...@@ -304,6 +305,17 @@ void __init orion5x_init(void)
orion5x_wdt_init(); orion5x_wdt_init();
} }
void orion5x_restart(char mode, const char *cmd)
{
/*
* Enable and issue soft reset
*/
orion5x_setbits(RSTOUTn_MASK, (1 << 2));
orion5x_setbits(CPU_SOFT_RESET, 1);
mdelay(200);
orion5x_clrbits(CPU_SOFT_RESET, 1);
}
/* /*
* Many orion-based systems have buggy bootloader implementations. * Many orion-based systems have buggy bootloader implementations.
* This is a common fixup for bogus memory tags. * This is a common fixup for bogus memory tags.
......
...@@ -39,6 +39,7 @@ void orion5x_spi_init(void); ...@@ -39,6 +39,7 @@ void orion5x_spi_init(void);
void orion5x_uart0_init(void); void orion5x_uart0_init(void);
void orion5x_uart1_init(void); void orion5x_uart1_init(void);
void orion5x_xor_init(void); void orion5x_xor_init(void);
void orion5x_restart(char, const char *);
/* /*
* PCIe/PCI functions. * PCIe/PCI functions.
......
...@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network") ...@@ -343,6 +343,7 @@ MACHINE_START(D2NET, "LaCie d2 Network")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network") ...@@ -355,6 +356,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board") ...@@ -364,4 +364,5 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
.init_early = orion5x_init_early, .init_early = orion5x_init_early,
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323") ...@@ -736,4 +736,5 @@ MACHINE_START(DNS323, "D-Link DNS-323")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2") ...@@ -258,4 +258,5 @@ MACHINE_START(EDMINI_V2, "LaCie Ethernet Disk mini V2")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,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();
...@@ -20,14 +18,6 @@ static inline void arch_idle(void) ...@@ -20,14 +18,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 and issue soft reset
*/
orion5x_setbits(RSTOUTn_MASK, (1 << 2));
orion5x_setbits(CPU_SOFT_RESET, 1);
mdelay(200);
orion5x_clrbits(CPU_SOFT_RESET, 1);
} }
#endif #endif
...@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") ...@@ -386,6 +386,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live") ...@@ -399,5 +400,6 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = { ...@@ -140,7 +140,7 @@ static struct mv_sata_platform_data lschl_sata_data = {
static void lschl_power_off(void) static void lschl_power_off(void)
{ {
arm_machine_restart('h', NULL); orion5x_restart('h', NULL);
} }
/***************************************************************************** /*****************************************************************************
...@@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)") ...@@ -325,4 +325,5 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = { ...@@ -186,7 +186,7 @@ static struct mv_sata_platform_data ls_hgl_sata_data = {
static void ls_hgl_power_off(void) static void ls_hgl_power_off(void)
{ {
arm_machine_restart('h', NULL); orion5x_restart('h', NULL);
} }
...@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL") ...@@ -272,4 +272,5 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = { ...@@ -186,7 +186,7 @@ static struct mv_sata_platform_data lsmini_sata_data = {
static void lsmini_power_off(void) static void lsmini_power_off(void)
{ {
arm_machine_restart('h', NULL); orion5x_restart('h', NULL);
} }
...@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini") ...@@ -274,5 +274,6 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
#endif #endif
...@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II") ...@@ -267,5 +267,6 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II")
.init_early = orion5x_init_early, .init_early = orion5x_init_early,
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32 .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120") ...@@ -234,5 +234,6 @@ MACHINE_START(MV2120, "HP Media Vault mv2120")
.init_early = orion5x_init_early, .init_early = orion5x_init_early,
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32 .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network") ...@@ -426,5 +426,6 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design") ...@@ -175,4 +175,5 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design") ...@@ -187,4 +187,5 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") ...@@ -311,4 +311,5 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
.init_early = orion5x_init_early, .init_early = orion5x_init_early,
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design") ...@@ -128,4 +128,5 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live") ...@@ -364,4 +364,5 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209") ...@@ -329,4 +329,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409") ...@@ -318,4 +318,5 @@ MACHINE_START(TS409, "QNAP TS-409")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC") ...@@ -627,4 +627,5 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
.init_early = orion5x_init_early, .init_early = orion5x_init_early,
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T") ...@@ -179,4 +179,5 @@ MACHINE_START(WNR854T, "Netgear WNR854T")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_restart,
MACHINE_END MACHINE_END
...@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2") ...@@ -267,4 +267,5 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
.init_irq = orion5x_init_irq, .init_irq = orion5x_init_irq,
.timer = &orion5x_timer, .timer = &orion5x_timer,
.fixup = tag_fixup_mem32, .fixup = tag_fixup_mem32,
.restart = orion5x_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