回复: [PATCH v2] clk: scmi: Fix clock identifier passed to struct scmi_clk_parent_set_in

Alice Guo (OSS) alice.guo at oss.nxp.com
Sun Jul 27 15:07:08 CEST 2025


Kindly ping.

Best Regards,
Alice Guo

> -----邮件原件-----
> 发件人: U-Boot <u-boot-bounces at lists.denx.de> 代表 Alice Guo (OSS)
> 发送时间: 2025年7月8日 4:21
> 收件人: lukma at denx.de; seanga2 at gmail.com; trini at konsulko.com;
> festevam at gmail.com; Alice Guo <alice.guo at nxp.com>;
> patrice.chotard at foss.st.com; patrick.delaunay at foss.st.com; Peng Fan
> <peng.fan at nxp.com>; Ye Li <ye.li at nxp.com>; valentin.caron at foss.st.com
> 抄送: u-boot at lists.denx.de
> 主题: [PATCH v2] clk: scmi: Fix clock identifier passed to struct
> scmi_clk_parent_set_in
> 
> From: Alice Guo <alice.guo at nxp.com>
> 
> Commit aa7bdc1af505 ("clk: scmi: manage properly the clk identifier with
> CFF") enables CONFIG_CLK_AUTO_ID, so need to use clk_get_id() to get the real
> SCMI CLK ID, otherwise wrong ID is used when set clk parent.
> 
> Fixes: aa7bdc1af505 ("clk: scmi: manage properly the clk identifier with
> CCF")
> 
> Signed-off-by: Alice Guo <alice.guo at nxp.com>
> Reviewed-by: Peng Fan <peng.fan at nxp.com>
> ---
> 
> Changes for v2:
>  - improve commit log
>  - add Reviewed-by
> 
>  drivers/clk/clk_scmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index
> cfb372e6190..0c9a81cabcc 100644
> --- a/drivers/clk/clk_scmi.c
> +++ b/drivers/clk/clk_scmi.c
> @@ -336,8 +336,8 @@ static int scmi_clk_probe(struct udevice *dev)  static
> int __scmi_clk_set_parent(struct clk *clk, struct clk *parent)  {
>  	struct scmi_clk_parent_set_in in = {
> -		.clock_id = clk->id,
> -		.parent_clk = parent->id,
> +		.clock_id = clk_get_id(clk),
> +		.parent_clk = clk_get_id(parent),
>  	};
>  	struct scmi_clk_parent_set_out out;
>  	struct scmi_msg msg = SCMI_MSG_IN(SCMI_PROTOCOL_ID_CLOCK,
> --
> 2.43.0



More information about the U-Boot mailing list