zephyr: allow to disable timers supports
For some basic mcuboot configurations the zephyr timers are
not required which reduce the flash footprint significantly.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index b47da2b..555c891 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -74,7 +74,9 @@
rsp->br_image_off +
rsp->br_hdr->ih_hdr_size);
irq_lock();
+#ifdef CONFIG_SYS_CLOCK_EXISTS
sys_clock_disable();
+#endif
#ifdef CONFIG_USB
/* Disable the USB to prevent it from firing interrupts */
usb_disable();