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)();
 }
diff --git a/boot/zephyr/prj-p256.conf b/boot/zephyr/prj-p256.conf
index 8a3bd84..a3cf7c0 100644
--- a/boot/zephyr/prj-p256.conf
+++ b/boot/zephyr/prj-p256.conf
@@ -1,6 +1,7 @@
 CONFIG_CONSOLE_HANDLER=y
 CONFIG_SYS_LOG=y
 CONFIG_DEBUG=y
+CONFIG_SYSTEM_CLOCK_DISABLE=y
 
 CONFIG_MAIN_STACK_SIZE=10240
 CONFIG_MBEDTLS=y
diff --git a/boot/zephyr/prj.conf b/boot/zephyr/prj.conf
index f6d9342..caf48f9 100644
--- a/boot/zephyr/prj.conf
+++ b/boot/zephyr/prj.conf
@@ -1,6 +1,7 @@
 CONFIG_CONSOLE_HANDLER=y
 CONFIG_SYS_LOG=y
 CONFIG_DEBUG=y
+CONFIG_SYSTEM_CLOCK_DISABLE=y
 
 CONFIG_MAIN_STACK_SIZE=10240
 CONFIG_MBEDTLS=y