From 1f070c91cfc957a3a97adccc0a2b38ae3cc8ce93 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Tue, 2 May 2023 13:36:12 +0200 Subject: [PATCH] drivers: timer: stm32u5 lptimer wait for ready only once The stm32_lptim_wait_ready() is waiting for the DIEROK flag with a while loop. It should not be repeated. Signed-off-by: Francois Ramu --- drivers/timer/stm32_lptim_timer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/timer/stm32_lptim_timer.c b/drivers/timer/stm32_lptim_timer.c index f12e9a9fdb5..05a8c611bc1 100644 --- a/drivers/timer/stm32_lptim_timer.c +++ b/drivers/timer/stm32_lptim_timer.c @@ -447,11 +447,6 @@ static int sys_clock_driver_init(void) /* ARROK bit validates the write operation to ARR register */ LL_LPTIM_EnableIT_ARROK(LPTIM); stm32_lptim_wait_ready(); -#ifdef CONFIG_SOC_SERIES_STM32U5X - while (LL_LPTIM_IsActiveFlag_DIEROK(LPTIM) == 0) { - } - LL_LPTIM_ClearFlag_DIEROK(LPTIM); -#endif LL_LPTIM_ClearFlag_ARROK(LPTIM); accumulated_lptim_cnt = 0;