Skip to content

Commit c73c306

Browse files
etienne-lmskartben
authored andcommitted
include: drivers: clock_control: stm32: fix STM32_CLOCK_INFO_BY_NAME()
Fix STM32_CLOCK_INFO_BY_NAME() macro that messed-up clock information. Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
1 parent 6f7eeaf commit c73c306

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/zephyr/drivers/clock_control/stm32_clock_control.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,10 @@ struct stm32_pclken {
840840
/* Get STM32 clock information for a named clock phandle in DT node */
841841
#define STM32_CLOCK_INFO_BY_NAME(node_id, name) \
842842
{ \
843-
.bus = DT_CLOCKS_CELL_BY_NAME(node_id, name, bus), \
844-
.enr = DT_CLOCKS_CELL_BY_NAME(node_id, name, bits) & \
843+
.enr = DT_CLOCKS_CELL_BY_NAME(node_id, name, bits), \
844+
.bus = DT_CLOCKS_CELL_BY_NAME(node_id, name, bus) & \
845845
GENMASK(STM32_CLOCK_DIV_SHIFT - 1, 0), \
846-
.div = DT_CLOCKS_CELL_BY_NAME(node_id, name, bits) >> \
846+
.div = DT_CLOCKS_CELL_BY_NAME(node_id, name, bus) >> \
847847
STM32_CLOCK_DIV_SHIFT, \
848848
}
849849

0 commit comments

Comments
 (0)