Re: [PATCH v4 2/2] clk: scmi: add compatibility for clock version 3.0 and onwards

Peng Fan
2025-11-07T04:41:45Z

On Tue, Nov 04, 2025 at 04:49:31PM +0530, Kamlesh Gurudasani wrote:
>Clock version 3.0 specified in ARM SCMI Platform design document
>v3.2, adds extended_config_val parameter in CLOCK_CONFIG_SET and
>CLOCK_CONFIG_GET. Add support for that.
>
>Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
>---
> drivers/clk/clk_scmi.c | 52 +++++++++++++++++++++++++++++++++++++++-------------
> include/scmi_protocols.h | 6 ++++++
> 2 files changed, 45 insertions(+), 13 deletions(-)
>
>diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c
>index 83ea7bb4286..6d47cc6cd01 100644
>--- a/drivers/clk/clk_scmi.c
>+++ b/drivers/clk/clk_scmi.c
>@@ -131,19 +131,45 @@ static int scmi_clk_get_attibute(struct udevice *dev, int clkid, char **name,
>
> static int scmi_clk_gate(struct clk *clk, int enable)
> {
>- struct scmi_clk_state_in in = {
>- .clock_id = clk_get_id(clk),
>- .attributes = enable,
>- };
>+ struct scmi_clock_priv *priv;
> struct scmi_clk_state_out out;
>- struct scmi_msg msg = SCMI_MSG_IN(SCMI_PROTOCOL_ID_CLOCK,
>- SCMI_CLOCK_CONFIG_SET,
>- in, out);
> int ret;
>
>- ret = devm_scmi_process_msg(clk->dev, &msg);
>- if (ret)
>- return ret;
>+ if (CONFIG_IS_ENABLED(CLK_CCF)) {
>+ /* CCF: version info is in parent device */
>+ priv = dev_get_priv(clk->dev->parent);

This is wrong, please use dev_get_parent_priv after
you rebase with fsl-qoirq/next. There is conflict, I could
not directly apply this patch and change this line at my side.

Thanks,
Peng