]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: restart: w90x900: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 14:50:25 +0000 (14:50 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:21 +0000 (12:57 +0000)
Hook these platforms restart code into the new restart hook rather
than using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-w90x900/cpu.c
arch/arm/mach-w90x900/include/mach/system.h
arch/arm/mach-w90x900/mach-nuc910evb.c
arch/arm/mach-w90x900/mach-nuc950evb.c
arch/arm/mach-w90x900/mach-nuc960evb.c
arch/arm/mach-w90x900/nuc9xx.h

index 0a235e502330ced25bb246da225778641bdcf3bb..604e1db266e8402d5f85c018c3870e15794c8bef 100644 (file)
 #include <mach/regs-serial.h>
 #include <mach/regs-clock.h>
 #include <mach/regs-ebi.h>
+#include <mach/regs-timer.h>
 
 #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);
+       }
+}
index 68875a1c16bed36402e1266d8437cbbce0252d85..001a2f93a1e2e4d008cfbec37fadf3aa421b9538 100644 (file)
  * (at your option) any later version.
  *
  */
-
-#include <linux/io.h>
-#include <asm/proc-fns.h>
-#include <mach/map.h>
-#include <mach/regs-timer.h>
-
-#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);
-       }
 }
 
index 31c109018228a20435523c4af960a2a628f55416..b4243e4f1565b4614db0a1ba64f21a92bdb0bb22 100644 (file)
@@ -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
index 4062e55a57d8a8cf2d6baef38d774e3426074a4c..067d8f9166dc2a1131d0a647402fb0b546afa4a9 100644 (file)
@@ -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
index 0ab9995d5b58be532dff1488d10e06291f034ad9..cbb3adc3db1074471d96a112d8c7940fa51e2080 100644 (file)
@@ -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
index 847c4f3e044040e8907f6edda4237d9f8a8795f0..91acb404779326789f1ca0944422bc044715f667 100644 (file)
@@ -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 *);