zephyr: disable clock before reset
Avoid clock related interrupts before jumping into the first image. Safe
to disable as the first application will enable the clock/timer again
once booted.
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index 885f667..ee0b36b 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -17,6 +17,7 @@
#include <zephyr.h>
#include <flash.h>
#include <asm_inline.h>
+#include <drivers/system_timer.h>
#define BOOT_LOG_LEVEL BOOT_LOG_LEVEL_INFO
#include "bootutil/bootutil_log.h"
@@ -52,6 +53,7 @@
vt = (struct arm_vector_table *)(rsp->br_image_addr +
rsp->br_hdr->ih_hdr_size);
irq_lock();
+ sys_clock_disable();
_MspSet(vt->msp);
((void (*)(void))vt->reset)();
}