[PATCH v2 04/13] clk: add CONFIG_CLK_AUTO_ID
Patrick DELAUNAY
patrick.delaunay at foss.st.com
Tue Jun 3 19:24:16 CEST 2025
Hi,
On 5/27/25 15:27, Patrice Chotard wrote:
> From: Patrick Delaunay <patrick.delaunay at foss.st.com>
>
> Add a new config CONFIG_CLK_AUTO_ID to support a unique clk id
> for all the clock providers, managed by clk uclass, when the clock
> reference arg[0] is the same.
>
> When the CONFIG is activated, the clock id is limited to the lower
> CLK_ID_SZ = 24 bits in default clock xlate function
> and the sequence number + 1 of the clk provider device is
> added for the 8 higher bits.
>
> We use sequence number + 1 to avoid the "dummy" clock id = 0,
> used for invalid clock when CCF is activated.
>
> When this config is activated, the new function clk_get_id()
> should be used to get back the internal reference to clock
> for the each clock provider.
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Cc: Lukasz Majewski <lukma at denx.de>
> Cc: Sean Anderson <seanga2 at gmail.com>
> ---
>
> (no changes since v1)
>
> drivers/clk/Kconfig | 10 ++++++++++
> drivers/clk/clk-uclass.c | 9 +++++++--
> drivers/clk/stm32/clk-stm32-core.c | 3 ++-
> include/clk.h | 24 ++++++++++++++++++++++++
> include/linux/clk-provider.h | 9 ++++++++-
> 5 files changed, 51 insertions(+), 4 deletions(-)
>
Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
Thanks
Patrick
More information about the U-Boot
mailing list