ARM: restart: mmp: use new restart hook
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Nov 2011 15:40:09 +0000 (15:40 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 5 Jan 2012 12:57:15 +0000 (12:57 +0000)
Hook the Shark restart code into the new restart hook rather than
using arch_reset().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 files changed:
arch/arm/mach-mmp/aspenite.c
arch/arm/mach-mmp/avengers_lite.c
arch/arm/mach-mmp/brownstone.c
arch/arm/mach-mmp/common.c
arch/arm/mach-mmp/common.h
arch/arm/mach-mmp/flint.c
arch/arm/mach-mmp/gplugd.c
arch/arm/mach-mmp/include/mach/pxa168.h
arch/arm/mach-mmp/include/mach/system.h
arch/arm/mach-mmp/jasper.c
arch/arm/mach-mmp/pxa168.c
arch/arm/mach-mmp/tavorevb.c
arch/arm/mach-mmp/teton_bga.c
arch/arm/mach-mmp/ttc_dkb.c

index 7a60bbbce7a43523c888f04a9ae8444fb95c1993..3e6dfab59ef68a120310188971d37df3a61e7c71 100644 (file)
@@ -243,6 +243,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = common_init,
+       .restart        = pxa168_restart,
 MACHINE_END
 
 MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
@@ -251,4 +252,5 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = common_init,
+       .restart        = pxa168_restart,
 MACHINE_END
index 39f0878d64a0c39ba026c2be0f20755576d75045..8de3dc6131a48e91efe66000005ddc0ab864d206 100644 (file)
@@ -45,4 +45,5 @@ MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = avengers_lite_init,
+       .restart        = pxa168_restart,
 MACHINE_END
index 983cfb15fbde99bc0b394b56a779cc4708f6be9c..e16f04b39b15f6c2abb3049719f81afbee9edd91 100644 (file)
@@ -219,4 +219,5 @@ MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
        .init_irq       = mmp2_init_irq,
        .timer          = &mmp2_timer,
        .init_machine   = brownstone_init,
+       .restart        = mmp_restart,
 MACHINE_END
index 5720674739f093f16b08e91d585fc0b8fe3c3e55..062b5b93c50e9eb2e8398f600de29d120a905289 100644 (file)
@@ -45,3 +45,8 @@ void __init mmp_map_io(void)
        /* this is early, initialize mmp_chip_id here */
        mmp_chip_id = __raw_readl(MMP_CHIPID);
 }
+
+void mmp_restart(char mode, const char *cmd)
+{
+       soft_restart(0);
+}
index ec8d65ded25cb7a6dd908f1d950da7366d38618a..1c9d6c1ea97a792159df74f66b9f7a3835bdca06 100644 (file)
@@ -6,3 +6,4 @@ extern void timer_init(int irq);
 
 extern void __init icu_init_irq(void);
 extern void __init mmp_map_io(void);
+extern void mmp_restart(char, const char *);
index c4fd806b15b42ad282533587e54a8378eb514c3d..5a6a27a6cfd075cfe3c50ba5b669a4daf9d9a5ff 100644 (file)
@@ -121,4 +121,5 @@ MACHINE_START(FLINT, "Flint Development Platform")
        .init_irq       = mmp2_init_irq,
        .timer          = &mmp2_timer,
        .init_machine   = flint_init,
+       .restart        = mmp_restart,
 MACHINE_END
index 4665767a4f79ee918ec1fd24053d296ce13d0806..1e3abbe37cac01b584e3a5857302092e62d4f4d3 100644 (file)
@@ -194,4 +194,5 @@ MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = gplugd_init,
+       .restart        = pxa168_restart,
 MACHINE_END
index 7fb568d2845b0da8f86c2614b6072b9526b3ee5e..a677aa732c2641d080e235a9abbfbb269852dcbe 100644 (file)
@@ -5,6 +5,7 @@ struct sys_timer;
 
 extern struct sys_timer pxa168_timer;
 extern void __init pxa168_init_irq(void);
+extern void pxa168_restart(char, const char *);
 extern void pxa168_clear_keypad_wakeup(void);
 
 #include <linux/i2c.h>
index cb0637933a85b89051f0b48e09051adcd0fb1306..c434f3a862fe2b0e34505b9a3d847ad883023fd0 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef __ASM_MACH_SYSTEM_H
 #define __ASM_MACH_SYSTEM_H
 
-#include <mach/cputype.h>
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
@@ -18,9 +16,5 @@ static inline void arch_idle(void)
 
 static inline void arch_reset(char mode, const char *cmd)
 {
-       if (cpu_is_pxa168())
-               soft_restart(0xffff0000);
-       else
-               soft_restart(0);
 }
 #endif /* __ASM_MACH_SYSTEM_H */
index 8bfac66126234df28995cbc630311cebbf482818..96cf5c8fe47dcb3b0529ead1538281d584f47e13 100644 (file)
@@ -175,4 +175,5 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
        .init_irq       = mmp2_init_irq,
        .timer          = &mmp2_timer,
        .init_machine   = jasper_init,
+       .restart        = mmp_restart,
 MACHINE_END
index 76ca15c00e4589602a5123e278a9960c07095c2a..13f23867a86ad3733f6258708893a2c2f9c2022f 100644 (file)
@@ -214,3 +214,8 @@ int __init pxa168_add_usb_host(struct pxa168_usb_pdata *pdata)
        pxa168_device_usb_host.dev.platform_data = pdata;
        return platform_device_register(&pxa168_device_usb_host);
 }
+
+void pxa168_restart(char mode, const char *cmd)
+{
+       soft_restart(0xffff0000);
+}
index eb5be879fd8cd76748d109546c77d34eb9914116..257a21283ec18afd6e51e82285f5d23a0fb9a859 100644 (file)
@@ -103,4 +103,5 @@ MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
        .init_irq       = pxa910_init_irq,
        .timer          = &pxa910_timer,
        .init_machine   = tavorevb_init,
+       .restart        = mmp_restart,
 MACHINE_END
index bbe4727b96ccb26f068b61f4096dd01b2d07fc5d..8ac22a62bf1a119cc4aeb2b44c7656a3e80019d1 100644 (file)
@@ -86,4 +86,5 @@ MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
        .init_irq       = pxa168_init_irq,
        .timer          = &pxa168_timer,
        .init_machine   = teton_bga_init,
+       .restart        = pxa168_restart,
 MACHINE_END
index 176515a7698935ee136842563b1c025e39a22651..f026588255766cf33916f5bbdfb8bf5f9d89ddb7 100644 (file)
@@ -159,4 +159,5 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
        .init_irq       = pxa910_init_irq,
        .timer          = &pxa910_timer,
        .init_machine   = ttc_dkb_init,
+       .restart        = mmp_restart,
 MACHINE_END