From fe76daea9ede24f9f53cb847563c2fa7a50cedf2 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 5 Nov 2011 14:50:25 +0000 Subject: [PATCH] ARM: restart: w90x900: 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-w90x900/cpu.c | 16 ++++++++++++++++ arch/arm/mach-w90x900/include/mach/system.h | 17 ----------------- arch/arm/mach-w90x900/mach-nuc910evb.c | 1 + arch/arm/mach-w90x900/mach-nuc950evb.c | 1 + arch/arm/mach-w90x900/mach-nuc960evb.c | 1 + arch/arm/mach-w90x900/nuc9xx.h | 1 + 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c index 0a235e50233..604e1db266e 100644 --- a/arch/arm/mach-w90x900/cpu.c +++ b/arch/arm/mach-w90x900/cpu.c @@ -33,9 +33,11 @@ #include #include #include +#include #include "cpu.h" #include "clock.h" +#include "nuc9xx.h" /* Initial IO mappings */ @@ -222,3 +224,17 @@ void __init nuc900_init_clocks(void) clkdev_add_table(nuc900_clkregs, ARRAY_SIZE(nuc900_clkregs)); } +#define WTCR (TMR_BA + 0x1C) +#define WTCLK (1 << 10) +#define WTE (1 << 7) +#define WTRE (1 << 1) + +void nuc9xx_restart(char mode, const char *cmd) +{ + if (mode == 's') { + /* Jump into ROM at address 0 */ + soft_restart(0); + } else { + __raw_writel(WTE | WTRE | WTCLK, WTCR); + } +} diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h index 68875a1c16b..001a2f93a1e 100644 --- a/arch/arm/mach-w90x900/include/mach/system.h +++ b/arch/arm/mach-w90x900/include/mach/system.h @@ -14,28 +14,11 @@ * (at your option) any later version. * */ - -#include -#include -#include -#include - -#define WTCR (TMR_BA + 0x1C) -#define WTCLK (1 << 10) -#define WTE (1 << 7) -#define WTRE (1 << 1) - static void arch_idle(void) { } static void arch_reset(char mode, const char *cmd) { - if (mode == 's') { - /* Jump into ROM at address 0 */ - soft_restart(0); - } else { - __raw_writel(WTE | WTRE | WTCLK, WTCR); - } } diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c index 31c10901822..b4243e4f156 100644 --- a/arch/arm/mach-w90x900/mach-nuc910evb.c +++ b/arch/arm/mach-w90x900/mach-nuc910evb.c @@ -38,4 +38,5 @@ MACHINE_START(W90P910EVB, "W90P910EVB") .init_irq = nuc900_init_irq, .init_machine = nuc910evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c index 4062e55a57d..067d8f9166d 100644 --- a/arch/arm/mach-w90x900/mach-nuc950evb.c +++ b/arch/arm/mach-w90x900/mach-nuc950evb.c @@ -41,4 +41,5 @@ MACHINE_START(W90P950EVB, "W90P950EVB") .init_irq = nuc900_init_irq, .init_machine = nuc950evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c index 0ab9995d5b5..cbb3adc3db1 100644 --- a/arch/arm/mach-w90x900/mach-nuc960evb.c +++ b/arch/arm/mach-w90x900/mach-nuc960evb.c @@ -38,4 +38,5 @@ MACHINE_START(W90N960EVB, "W90N960EVB") .init_irq = nuc900_init_irq, .init_machine = nuc960evb_init, .timer = &nuc900_timer, + .restart = nuc9xx_restart, MACHINE_END diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h index 847c4f3e044..91acb404779 100644 --- a/arch/arm/mach-w90x900/nuc9xx.h +++ b/arch/arm/mach-w90x900/nuc9xx.h @@ -21,3 +21,4 @@ struct sys_timer; extern void nuc900_init_irq(void); extern struct sys_timer nuc900_timer; +extern void nuc9xx_restart(char, const char *);