diff options
Diffstat (limited to 'arch/mips/mach-ath79/reset.c')
-rw-r--r-- | arch/mips/mach-ath79/reset.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/mips/mach-ath79/reset.c b/arch/mips/mach-ath79/reset.c index a0e9b349ca..0665788227 100644 --- a/arch/mips/mach-ath79/reset.c +++ b/arch/mips/mach-ath79/reset.c @@ -16,9 +16,11 @@ */ #include <common.h> +#include <init.h> +#include <restart.h> #include <mach/ath79.h> -void __noreturn reset_cpu(ulong addr) +static void __noreturn ath79_restart_soc(struct restart_handler *rst) { ath79_reset_wr(AR933X_RESET_REG_RESET_MODULE, AR71XX_RESET_FULL_CHIP); /* @@ -26,7 +28,14 @@ void __noreturn reset_cpu(ulong addr) * pulling the reset pin. The system will reboot with PLL disabled. * Always zero when read. */ - unreachable(); + hang(); /*NOTREACHED*/ } -EXPORT_SYMBOL(reset_cpu); + +static int restart_register_feature(void) +{ + restart_handler_register_fn(ath79_restart_soc); + + return 0; +} +coredevice_initcall(restart_register_feature); |