diff options
Diffstat (limited to 'arch/arm/mach-at91/setup.c')
-rw-r--r-- | arch/arm/mach-at91/setup.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 341979ae89..1fa50ac054 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c @@ -8,6 +8,7 @@ #include <common.h> #include <io.h> #include <init.h> +#include <restart.h> #include <mach/hardware.h> #include <mach/cpu.h> @@ -296,6 +297,9 @@ static int at91_detect(void) } postcore_initcall(at91_detect); +void restart_sam9(struct restart_handler *rst); +void restart_sam9g45(struct restart_handler *rst); + static int at91_soc_device(void) { struct device_d *dev; @@ -304,6 +308,11 @@ static int at91_soc_device(void) dev_add_param_fixed(dev, "name", (char*)at91_get_soc_type(&at91_soc_initdata)); dev_add_param_fixed(dev, "subname", (char*)at91_get_soc_subtype(&at91_soc_initdata)); + if (IS_ENABLED(CONFIG_AT91SAM9_RESET)) + restart_handler_register_fn(restart_sam9); + if (IS_ENABLED(CONFIG_AT91SAM9G45_RESET)) + restart_handler_register_fn(restart_sam9g45); + return 0; } coredevice_initcall(at91_soc_device); |