Skip to content

Commit 7e3974b

Browse files
author
Russell King
committed
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>
1 parent abea3f2 commit 7e3974b

4 files changed

Lines changed: 24 additions & 23 deletions

File tree

‎arch/arm/mach-u300/core.c‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,3 +1888,24 @@ static int core_module_init(void)
18881888
return mmc_init(&mmcsd_device);
18891889
}
18901890
module_init(core_module_init);
1891+
1892+
/* Forward declare this function from the watchdog */
1893+
void coh901327_watchdog_reset(void);
1894+
1895+
void 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+
}

‎arch/arm/mach-u300/include/mach/platform.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
void u300_map_io(void);
1515
void u300_init_irq(void);
1616
void u300_init_devices(void);
17+
void u300_restart(char, const char *);
1718
extern struct sys_timer u300_timer;
1819

1920
#endif

‎arch/arm/mach-u300/include/mach/system.h‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,11 @@
88
* System shutdown and reset functions.
99
* Author: Linus Walleij <linus.walleij@stericsson.com>
1010
*/
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 */
17-
void coh901327_watchdog_reset(void);
18-
1911
static inline void arch_idle(void)
2012
{
2113
cpu_do_idle();
2214
}
2315

24-
static void arch_reset(char mode, const char *cmd)
16+
static inline void arch_reset(char mode, const char *cmd)
2517
{
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);
4018
}

‎arch/arm/mach-u300/u300.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING)
5151
.init_irq = u300_init_irq,
5252
.timer = &u300_timer,
5353
.init_machine = u300_init_machine,
54+
.restart = u300_restart,
5455
MACHINE_END

0 commit comments

Comments
 (0)