diff options
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200_time.c')
-rw-r--r-- | arch/arm/mach-at91/at91rm9200_time.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index ae0172b4f4..fd11223b6f 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c @@ -28,6 +28,7 @@ #include <common.h> #include <init.h> #include <clock.h> +#include <restart.h> #include <mach/hardware.h> #include <mach/at91_tc.h> #include <mach/at91_st.h> @@ -77,7 +78,7 @@ core_initcall(clocksource_init); /* * Reset the cpu through the reset controller */ -void __noreturn reset_cpu (unsigned long ignored) +static void __noreturn at91rm9200_restart_soc(struct restart_handler *rst) { /* * Perform a hardware reset with the use of the Watchdog timer. @@ -86,6 +87,13 @@ void __noreturn reset_cpu (unsigned long ignored) at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); /* Not reached */ - while (1); + hang(); } -EXPORT_SYMBOL(reset_cpu); + +static int restart_register_feature(void) +{ + restart_handler_register_fn(at91rm9200_restart_soc); + + return 0; +} +coredevice_initcall(restart_register_feature); |