summaryrefslogtreecommitdiff
path: root/chip/npcx/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/npcx/clock.c')
-rw-r--r--chip/npcx/clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/npcx/clock.c b/chip/npcx/clock.c
index c59516043b..5cbd54cf11 100644
--- a/chip/npcx/clock.c
+++ b/chip/npcx/clock.c
@@ -174,8 +174,8 @@ int clock_get_apb2_freq(void)
*/
void clock_wait_cycles(uint32_t cycles)
{
- asm("1: subs %0, #1\n"
- " bne 1b\n" : : "r"(cycles));
+ asm volatile("1: subs %0, #1\n"
+ " bne 1b\n" : "+r"(cycles));
}
#ifdef CONFIG_LOW_POWER_IDLE