Skip to content
Commit fafaa582 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Benjamin Cabé
Browse files

drivers: clock: stm32: support STM32_CLOCK_DIV()



Support specifying divided clock buses by introduction of
STM32_CLOCK_DIV(div) macro. This macro can be used in devicetree to define
clock source of peripherals.

HSE is selected in devicetree using:

   <&rcc STM32_SRC_HSE ...>;

HSE/2 can now be selected with:

   <&rcc (STM32_SRC_HSE | STM32_CLOCK_DIV(2)) ...>;

This allows to use clock_control_get_rate() API in peripherals in order to
get desired clock rate.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@emb.dev>
parent db43d2c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment