aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-11-05 11:51:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-05 07:57:20 -0500
commit7e3974b2f3e393abcf7934f020e26d3d22efa940 (patch)
tree5e9a9b718e764765c6379ef518434e043a60c8c4 /arch/arm
parentabea3f2ce05f57e185b080e4a313f9fb519a0ecb (diff)
ARM: restart: u300: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset(). Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-u300/core.c21
-rw-r--r--arch/arm/mach-u300/include/mach/platform.h1
-rw-r--r--arch/arm/mach-u300/include/mach/system.h24
-rw-r--r--arch/arm/mach-u300/u300.c1
4 files changed, 24 insertions, 23 deletions
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index ac0791e924bc..27be5a794f62 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1888,3 +1888,24 @@ static int core_module_init(void)
1888 return mmc_init(&mmcsd_device); 1888 return mmc_init(&mmcsd_device);
1889} 1889}
1890module_init(core_module_init); 1890module_init(core_module_init);
1891
1892/* Forward declare this function from the watchdog */
1893void coh901327_watchdog_reset(void);
1894
1895void u300_restart(char mode, const char *cmd)
1896{
1897 switch (mode) {
1898 case 's':
1899 case 'h':
1900 printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
1901#ifdef CONFIG_COH901327_WATCHDOG
1902 coh901327_watchdog_reset();
1903#endif
1904 break;
1905 default:
1906 /* Do nothing */
1907 break;
1908 }
1909 /* Wait for system do die/reset. */
1910 while (1);
1911}
diff --git a/arch/arm/mach-u300/include/mach/platform.h b/arch/arm/mach-u300/include/mach/platform.h
index 77d9210a82e2..096333f32fc3 100644
--- a/arch/arm/mach-u300/include/mach/platform.h
+++ b/arch/arm/mach-u300/include/mach/platform.h
@@ -14,6 +14,7 @@
14void u300_map_io(void); 14void u300_map_io(void);
15void u300_init_irq(void); 15void u300_init_irq(void);
16void u300_init_devices(void); 16void u300_init_devices(void);
17void u300_restart(char, const char *);
17extern struct sys_timer u300_timer; 18extern struct sys_timer u300_timer;
18 19
19#endif 20#endif
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
index 6b6fef7a438c..0ddf3cd367c3 100644
--- a/arch/arm/mach-u300/include/mach/system.h
+++ b/arch/arm/mach-u300/include/mach/system.h
@@ -8,33 +8,11 @@
8 * System shutdown and reset functions. 8 * System shutdown and reset functions.
9 * Author: Linus Walleij <linus.walleij@stericsson.com> 9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */ 10 */
11#include <mach/hardware.h>
12#include <asm/io.h>
13#include <asm/hardware/vic.h>
14#include <asm/irq.h>
15
16/* Forward declare this function from the watchdog */
17void coh901327_watchdog_reset(void);
18
19static inline void arch_idle(void) 11static inline void arch_idle(void)
20{ 12{
21 cpu_do_idle(); 13 cpu_do_idle();
22} 14}
23 15
24static void arch_reset(char mode, const char *cmd) 16static inline void arch_reset(char mode, const char *cmd)
25{ 17{
26 switch (mode) {
27 case 's':
28 case 'h':
29 printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
30#ifdef CONFIG_COH901327_WATCHDOG
31 coh901327_watchdog_reset();
32#endif
33 break;
34 default:
35 /* Do nothing */
36 break;
37 }
38 /* Wait for system do die/reset. */
39 while (1);
40} 18}
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 89422ee7f3a8..a75c9b839748 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING)
51 .init_irq = u300_init_irq, 51 .init_irq = u300_init_irq,
52 .timer = &u300_timer, 52 .timer = &u300_timer,
53 .init_machine = u300_init_machine, 53 .init_machine = u300_init_machine,
54 .restart = u300_restart,
54MACHINE_END 55MACHINE_END