diff options
Diffstat (limited to 'chip/mchp/lfw/ec_lfw.c')
-rw-r--r-- | chip/mchp/lfw/ec_lfw.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/chip/mchp/lfw/ec_lfw.c b/chip/mchp/lfw/ec_lfw.c index dfd9814e6e..eb8b3370cb 100644 --- a/chip/mchp/lfw/ec_lfw.c +++ b/chip/mchp/lfw/ec_lfw.c @@ -6,23 +6,23 @@ * */ -#include <stdint.h> - +#include "clock.h" #include "config.h" +#include "cpu.h" #include "cros_version.h" +#include "dma.h" #include "gpio.h" +#include "gpio_list.h" +#include "hwtimer.h" +#include "registers.h" #include "spi.h" #include "spi_flash.h" -#include "util.h" -#include "timer.h" -#include "dma.h" -#include "registers.h" -#include "cpu.h" -#include "clock.h" #include "system.h" -#include "hwtimer.h" -#include "gpio_list.h" #include "tfdp_chip.h" +#include "timer.h" +#include "util.h" + +#include <stdint.h> #ifdef CONFIG_MCHP_LFW_DEBUG #include "dma_chip.h" @@ -305,7 +305,7 @@ void uart_init(void) } #endif /* #ifdef CONFIG_UART_CONSOLE */ -void fault_handler(void) +noreturn void watchdog_reset(void) { uart_puts("EXCEPTION!\nTriggering watchdog reset\n"); /* trigger reset in 1 ms */ @@ -315,6 +315,11 @@ void fault_handler(void) ; } +void fault_handler(void) +{ + asm("b watchdog_reset"); +} + void jump_to_image(uintptr_t init_addr) { void (*resetvec)(void) = (void (*)(void))init_addr; |