Skip to content

Commit

Permalink
[nrf fromtree] boot: zephyr: Only call sys_clock_disable when supported
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
joerchan authored and mbolivar-nordic committed Feb 20, 2023
1 parent 1b44538 commit e9086ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boot/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ static void do_boot(struct boot_rsp *rsp)
rsp->br_hdr->ih_hdr_size);
#endif

sys_clock_disable();
if (IS_ENABLED(CONFIG_SYSTEM_TIMER_HAS_DISABLE_SUPPORT)) {
sys_clock_disable();
}

#ifdef CONFIG_USB_DEVICE_STACK
/* Disable the USB to prevent it from firing interrupts */
Expand Down

0 comments on commit e9086ca

Please sign in to comment.