ARM: restart: ks8695: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 11 Nov 2011 15:30:47 +0000 (15:30 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:15 +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-ks8695/board-acs5k.c
arch/arm/mach-ks8695/board-dsm320.c
arch/arm/mach-ks8695/board-micrel.c
arch/arm/mach-ks8695/generic.h
arch/arm/mach-ks8695/include/mach/system.h
arch/arm/mach-ks8695/time.c

index a91f99d265aa8a5897efba886869fed32da44363..255502ddd87924b444a27ba9f669d463f73ba251 100644 (file)
@@ -228,4 +228,5 @@ MACHINE_START(ACS5K, "Brivo Systems LLC ACS-5000 Master board")
        .init_irq       = ks8695_init_irq,
        .init_machine   = acs5k_init,
        .timer          = &ks8695_timer,
+       .restart        = ks8695_restart,
 MACHINE_END
index d24bcef2e2dd782d336d8283fe94a636fc456019..e0d36cef2c56faea7e215ce680aeda29140742eb 100644 (file)
@@ -126,4 +126,5 @@ MACHINE_START(DSM320, "D-Link DSM-320 Wireless Media Player")
        .init_irq       = ks8695_init_irq,
        .init_machine   = dsm320_init,
        .timer          = &ks8695_timer,
+       .restart        = ks8695_restart,
 MACHINE_END
index 16c95657f8fd4548aad5027ee4d66cb597edf481..a8270725b76d271773cffce4886886671f2964a3 100644 (file)
@@ -58,4 +58,5 @@ MACHINE_START(KS8695, "KS8695 Centaur Development Board")
        .init_irq       = ks8695_init_irq,
        .init_machine   = micrel_init,
        .timer          = &ks8695_timer,
+       .restart        = ks8695_restart,
 MACHINE_END
index 2fbfab8d5faeff91308ecc9fe880927b55ccd59b..f8bdb11a9c33c342d73d0bece21382b6ec544556 100644 (file)
@@ -12,4 +12,5 @@
 
 extern __init void ks8695_map_io(void);
 extern __init void ks8695_init_irq(void);
+extern void ks8695_restart(char, const char *);
 extern struct sys_timer ks8695_timer;
index ceb19c90aa529509cf7c392392113c5397447f9b..d6de241860bb93b98960f7510a432376b5221e06 100644 (file)
@@ -14,9 +14,6 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <linux/io.h>
-#include <mach/regs-timer.h>
-
 static void arch_idle(void)
 {
        /*
@@ -29,20 +26,6 @@ static void arch_idle(void)
 
 static void arch_reset(char mode, const char *cmd)
 {
-       unsigned int reg;
-
-       if (mode == 's')
-               soft_restart(0);
-
-       /* disable timer0 */
-       reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
-       __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
-
-       /* enable watchdog mode */
-       __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);
-
-       /* re-enable timer0 */
-       __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
 }
 
 #endif
index 69c072c2c0f9a28c1fc466a786216f4ad62b24e8..37dfcd5bd2ad9178213bac8ad27b080cd37dc03d 100644 (file)
@@ -109,3 +109,21 @@ struct sys_timer ks8695_timer = {
        .offset         = ks8695_gettimeoffset,
        .resume         = ks8695_timer_setup,
 };
+
+void ks8695_restart(char mode, const char *cmd)
+{
+       unsigned int reg;
+
+       if (mode == 's')
+               soft_restart(0);
+
+       /* disable timer0 */
+       reg = __raw_readl(KS8695_TMR_VA + KS8695_TMCON);
+       __raw_writel(reg & ~TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
+
+       /* enable watchdog mode */
+       __raw_writel((10 << 8) | T0TC_WATCHDOG, KS8695_TMR_VA + KS8695_T0TC);
+
+       /* re-enable timer0 */
+       __raw_writel(reg | TMCON_T0EN, KS8695_TMR_VA + KS8695_TMCON);
+}
This page took 0.032403 seconds and 5 git commands to generate.