[PATCH v2 4/4] clk: scmi: Defer issue of SCMI_CLOCK_ATTRIBUTES
Marek Vasut
marek.vasut at mailbox.org
Sun Nov 9 02:38:15 CET 2025
On 11/8/25 9:02 AM, Peng Fan wrote:
Hello Peng,
>> 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.
It seems in the end, we were both right about the device parent. The
function has to use dev->parent, but not clk->dev->parent, but the
c->dev->parent resolved by clk_get_by_id() .
I sent a V3 with this change:
"
diff --git a/drivers/clk/clk_scmi.c b/drivers/clk/clk_scmi.c
index 4e8e5a262c8..538ae054f4b 100644
--- a/drivers/clk/clk_scmi.c
+++ b/drivers/clk/clk_scmi.c
@@ -167,8 +167,8 @@ 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;
struct clk_scmi *clkscmi;
+ struct udevice *dev;
u32 attributes;
struct clk *c;
int ret;
@@ -177,6 +177,8 @@ static int scmi_clk_get_ctrl_flags(struct clk *clk,
u32 *ctrl_flags)
if (ret)
return ret;
+ dev = c->dev->parent;
+
clkscmi = container_of(c, struct clk_scmi, clk);
if (!clkscmi->attrs_resolved) {
"
More information about the U-Boot
mailing list