Skip to content

Commit

Permalink
include: drivers: clock_control stm32 bus clock index can exceed 256
Browse files Browse the repository at this point in the history
For some stm32 devices, especially the stm32H7RS serie,
the RCC register map is larger that 256 (example  AHB1 is 0x138).
The mask is extended to 512 in the .bus of the clock info structure.

Signed-off-by: Francois Ramu <[email protected]>
  • Loading branch information
FRASTM committed Dec 16, 2024
1 parent 29208fe commit 254e041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/zephyr/drivers/clock_control/stm32_clock_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ struct stm32_pclken {
#define STM32_CLOCK_INFO(clk_index, node_id) \
{ \
.enr = DT_CLOCKS_CELL_BY_IDX(node_id, clk_index, bits), \
.bus = DT_CLOCKS_CELL_BY_IDX(node_id, clk_index, bus) & 0xff, \
.bus = DT_CLOCKS_CELL_BY_IDX(node_id, clk_index, bus) & 0x1ff, \
.div = DT_CLOCKS_CELL_BY_IDX(node_id, clk_index, bus) >> \
STM32_CLOCK_DIV_SHIFT, \
}
Expand Down

0 comments on commit 254e041

Please sign in to comment.