Skip to content

Commit e199ff5

Browse files
erwangogalak
authored andcommitted
drivers/clock_control: stm32: Use RCC_PLLCFGR_PLLQ_Pos directly
For PLLQ divisor configuration, use directly RCC_PLLCFGR_PLLQ_Pos definition instead of calculating its position from RCC_PLLCFGR_PLLQ. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 601dcac commit e199ff5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clock_control/stm32_ll_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ static int stm32_clock_control_init(struct device *dev)
269269
#ifdef CONFIG_CLOCK_STM32_PLL_Q_DIVISOR
270270
MODIFY_REG(RCC->PLLCFGR, RCC_PLLCFGR_PLLQ,
271271
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR
272-
<< POSITION_VAL(RCC_PLLCFGR_PLLQ));
272+
<< RCC_PLLCFGR_PLLQ_Pos);
273273
#endif /* CONFIG_CLOCK_STM32_PLL_Q_DIVISOR */
274274

275275
#ifdef CONFIG_CLOCK_STM32_PLL_SRC_MSI

0 commit comments

Comments
 (0)