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>hifive-unleashed-5.1
parent
abea3f2ce0
commit
7e3974b2f3
|
@ -1888,3 +1888,24 @@ static int core_module_init(void)
|
||||||
return mmc_init(&mmcsd_device);
|
return mmc_init(&mmcsd_device);
|
||||||
}
|
}
|
||||||
module_init(core_module_init);
|
module_init(core_module_init);
|
||||||
|
|
||||||
|
/* Forward declare this function from the watchdog */
|
||||||
|
void coh901327_watchdog_reset(void);
|
||||||
|
|
||||||
|
void u300_restart(char mode, const char *cmd)
|
||||||
|
{
|
||||||
|
switch (mode) {
|
||||||
|
case 's':
|
||||||
|
case 'h':
|
||||||
|
printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
|
||||||
|
#ifdef CONFIG_COH901327_WATCHDOG
|
||||||
|
coh901327_watchdog_reset();
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* Do nothing */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* Wait for system do die/reset. */
|
||||||
|
while (1);
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
void u300_map_io(void);
|
void u300_map_io(void);
|
||||||
void u300_init_irq(void);
|
void u300_init_irq(void);
|
||||||
void u300_init_devices(void);
|
void u300_init_devices(void);
|
||||||
|
void u300_restart(char, const char *);
|
||||||
extern struct sys_timer u300_timer;
|
extern struct sys_timer u300_timer;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,33 +8,11 @@
|
||||||
* System shutdown and reset functions.
|
* System shutdown and reset functions.
|
||||||
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
* Author: Linus Walleij <linus.walleij@stericsson.com>
|
||||||
*/
|
*/
|
||||||
#include <mach/hardware.h>
|
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/hardware/vic.h>
|
|
||||||
#include <asm/irq.h>
|
|
||||||
|
|
||||||
/* Forward declare this function from the watchdog */
|
|
||||||
void coh901327_watchdog_reset(void);
|
|
||||||
|
|
||||||
static inline void arch_idle(void)
|
static inline void arch_idle(void)
|
||||||
{
|
{
|
||||||
cpu_do_idle();
|
cpu_do_idle();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arch_reset(char mode, const char *cmd)
|
static inline void arch_reset(char mode, const char *cmd)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
|
||||||
case 's':
|
|
||||||
case 'h':
|
|
||||||
printk(KERN_CRIT "RESET: shutting down/rebooting system\n");
|
|
||||||
#ifdef CONFIG_COH901327_WATCHDOG
|
|
||||||
coh901327_watchdog_reset();
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* Do nothing */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* Wait for system do die/reset. */
|
|
||||||
while (1);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,4 +51,5 @@ MACHINE_START(U300, MACH_U300_STRING)
|
||||||
.init_irq = u300_init_irq,
|
.init_irq = u300_init_irq,
|
||||||
.timer = &u300_timer,
|
.timer = &u300_timer,
|
||||||
.init_machine = u300_init_machine,
|
.init_machine = u300_init_machine,
|
||||||
|
.restart = u300_restart,
|
||||||
MACHINE_END
|
MACHINE_END
|
||||||
|
|
Loading…
Reference in New Issue