]> git.ipfire.org Git - thirdparty/u-boot.git/commit
clk: scmi: manage properly the clk identifier with CCF
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 27 May 2025 13:27:50 +0000 (15:27 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 11 Jun 2025 07:42:55 +0000 (09:42 +0200)
commitaa7bdc1af505c1f69e4c3e4d14afdb5632aed8bc
tree4c591c50cda022b12579f7f499108ffccaa75d72
parent64b07829f7cd58546f3a0b537b1b0a9d7efddee7
clk: scmi: manage properly the clk identifier with CCF

Each clock identifier needs to be unique when CCF is activated,
and it is not respected today by SCMI clock driver.

This patch supports a unique clk id by using the uclass API
clk_get_id() / dev_clk_dm() and by activating by default
CONFIG_CLK_AUTO_ID with CCF which adds an offset to the SCMI
clock identifiers.

After this patch, the SCMI clock driver can coexist with other
clock provider without conflict, they can share internal identifier
[0..N] defined in their binding and the clock ID = 0
(reserved for dummy clock) is no more used.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/clk/Kconfig
drivers/clk/clk_scmi.c