[PATCH v2 4/4] clk: scmi: Defer issue of SCMI_CLOCK_ATTRIBUTES
Peng Fan
peng.fan at nxp.com
Sat Nov 8 09:02:22 CET 2025
> Subject: Re: [PATCH v2 4/4] clk: scmi: Defer issue of
> SCMI_CLOCK_ATTRIBUTES
> >
> > I will change this to "clk->dev", otherwise there is CI failure.
>
> What kind of CI failure ?
=> ut dm dm_test_scmi_clocks
Test: scmi_clocks: scmi.c
find_scmi_protocol_device() sandbox-scmi_agent scmi: Invalid SCMI device, agent not found
test/dm/scmi.c:426, dm_test_scmi_clocks(): !ret_dev || ret_dev == 1088
Test: scmi_clocks: scmi.c (flat tree)
find_scmi_protocol_device() sandbox-scmi_agent scmi: Invalid SCMI device, agent not found
test/dm/scmi.c:426, dm_test_scmi_clocks(): !ret_dev || ret_dev == 1088
Test 'scmi_clocks' failed 2 times
Tests run: 1, 11 ms, average: 11 ms, failures: 2
exit not allowed from main input shell.
Regards,
Peng.
>
> > No need to use clk->dev->parent here. The core code will find out the
> > scmi root device.
> >
> > No need send v3, I could patch it in tree if no objections.
> This change would be wrong, so please do not do that. Apply this patch:
>
> "
> diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c index
> 4e8e5a262c8..99fd9679634 100644
> --- a/drivers/clk/clk_scmi.c
> +++ b/drivers/clk/clk_scmi.c
> @@ -168,6 +168,7 @@ static int scmi_clk_gate(struct clk *clk, int
> enable)
> static int scmi_clk_get_ctrl_flags(struct clk *clk, u32 *ctrl_flags)
> {
> struct udevice *dev = clk->dev->parent;
> +printf("clk->dev->name=%s clk->dev->parent->name=%s\n", clk->dev-
> >name,
> clk->dev->parent->name);
> struct clk_scmi *clkscmi;
> u32 attributes;
> struct clk *c;
> "
>
> When U-Boot starts, the output looks this way:
>
> "
> clk->dev->name=scmi-325 clk->dev->parent->name=protocol at 14
> "
>
> Notice "clk->dev->parent->name=protocol at 14" , which is correct,
> therefore the clk->dev->parent is correct.
>
> With the "clk->dev" change applied, the wrong device is used and the
> system starts producing failures:
>
> "
> scmi-over-mailbox scmi: Buffer too small: hdr->length:32,
> out_msg_sz:24 "
>
> What kind of CI failure do you observe ?
More information about the U-Boot
mailing list