diff options
Diffstat (limited to 'chip')
-rw-r--r-- | chip/lm4/clock.c | 6 | ||||
-rw-r--r-- | chip/stm32/clock-stm32f0.c | 6 | ||||
-rw-r--r-- | chip/stm32/clock-stm32f4.c | 4 | ||||
-rw-r--r-- | chip/stm32/clock-stm32h7.c | 4 | ||||
-rw-r--r-- | chip/stm32/clock-stm32l4.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/chip/lm4/clock.c b/chip/lm4/clock.c index a54a6a88f0..31ace04ce5 100644 --- a/chip/lm4/clock.c +++ b/chip/lm4/clock.c @@ -449,7 +449,7 @@ static int command_sleep(int argc, char **argv) void (*rom_clock_set)(uint32_t rcc) = func_table[23]; /* Disable interrupts. */ - asm volatile("cpsid i"); + interrupt_disable(); switch (clock) { case 1: /* 16MHz IOSC */ @@ -486,7 +486,7 @@ static int command_sleep(int argc, char **argv) /* Enable the port. */ LM4_UART_CTL(0) |= 0x0001; } - asm volatile("cpsie i"); + interrupt_enable(); } if (uartfbrd) { @@ -495,7 +495,7 @@ static int command_sleep(int argc, char **argv) } /* Enable interrupts. */ - asm volatile("cpsid i"); + interrupt_disable(); /* gate peripheral clocks */ if (level & 1) { diff --git a/chip/stm32/clock-stm32f0.c b/chip/stm32/clock-stm32f0.c index 0f63bdd394..d791d63df3 100644 --- a/chip/stm32/clock-stm32f0.c +++ b/chip/stm32/clock-stm32f0.c @@ -259,7 +259,7 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds) set_rtc_alarm(seconds, microseconds, &rtc, 0); /* interrupts off now */ - asm volatile("cpsid i"); + interrupt_disable(); #ifdef CONFIG_HIBERNATE_WAKEUP_PINS /* enable the wake up pins */ @@ -298,7 +298,7 @@ void __idle(void) struct rtc_time_reg rtc0, rtc1; while (1) { - asm volatile("cpsid i"); + interrupt_disable(); t0 = get_time(); next_delay = __hw_clock_event_get() - t0.le.lo; @@ -376,7 +376,7 @@ void __idle(void) #ifdef CONFIG_LOW_POWER_IDLE_LIMITED en_int: #endif - asm volatile("cpsie i"); + interrupt_enable(); } } #endif /* CONFIG_LOW_POWER_IDLE */ diff --git a/chip/stm32/clock-stm32f4.c b/chip/stm32/clock-stm32f4.c index d6427fffc7..83a7b0a84e 100644 --- a/chip/stm32/clock-stm32f4.c +++ b/chip/stm32/clock-stm32f4.c @@ -462,7 +462,7 @@ void __idle(void) struct rtc_time_reg rtc0, rtc1; while (1) { - asm volatile("cpsid i"); + interrupt_disable(); t0 = get_time(); next_delay = __hw_clock_event_get() - t0.le.lo; @@ -537,7 +537,7 @@ void __idle(void) /* Normal idle : only CPU clock stopped */ asm("wfi"); } - asm volatile("cpsie i"); + interrupt_enable(); } } diff --git a/chip/stm32/clock-stm32h7.c b/chip/stm32/clock-stm32h7.c index 696105b4f1..ae60d596f1 100644 --- a/chip/stm32/clock-stm32h7.c +++ b/chip/stm32/clock-stm32h7.c @@ -471,7 +471,7 @@ void __idle(void) uint16_t lptim0; while (1) { - asm volatile("cpsid i"); + interrupt_disable(); t0 = get_time(); next_delay = __hw_clock_event_get() - t0.le.lo; @@ -538,7 +538,7 @@ void __idle(void) /* normal idle : only CPU clock stopped */ asm("wfi"); } - asm volatile("cpsie i"); + interrupt_enable(); } } diff --git a/chip/stm32/clock-stm32l4.c b/chip/stm32/clock-stm32l4.c index b07b5fb2d4..730f5d6bb9 100644 --- a/chip/stm32/clock-stm32l4.c +++ b/chip/stm32/clock-stm32l4.c @@ -1039,7 +1039,7 @@ void __idle(void) struct rtc_time_reg rtc0, rtc1; while (1) { - asm volatile("cpsid i"); + interrupt_disable(); t0 = get_time(); next_delay = __hw_clock_event_get() - t0.le.lo; @@ -1103,7 +1103,7 @@ void __idle(void) /* Normal idle : only CPU clock stopped */ asm("wfi"); } - asm volatile("cpsie i"); + interrupt_enable(); } } |