Skip to content

Commit e9086ca

Browse files
joerchanmbolivar-nordic
authored andcommitted
[nrf fromtree] boot: zephyr: Only call sys_clock_disable when supported
Only call sys_clock_disable when the system clock driver support this feature. Signed-off-by: Joakim Andersson <[email protected]> Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit 6242c86)
1 parent 1b44538 commit e9086ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot/zephyr/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ static void do_boot(struct boot_rsp *rsp)
207207
rsp->br_hdr->ih_hdr_size);
208208
#endif
209209

210-
sys_clock_disable();
210+
if (IS_ENABLED(CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT)) {
211+
sys_clock_disable();
212+
}
211213

212214
#ifdef CONFIG_USB_DEVICE_STACK
213215
/* Disable the USB to prevent it from firing interrupts */

0 commit comments

Comments
 (0)