[PATCH v2 4/4] clk: scmi: Defer issue of SCMI_CLOCK_ATTRIBUTES

Peng Fan peng.fan at oss.nxp.com
Fri Nov 7 13:16:50 CET 2025


Hi Marek,

On Fri, Nov 07, 2025 at 04:01:26AM +0100, Marek Vasut wrote:
>Instead of resolving clock control flags using SCMI_CLOCK_ATTRIBUTES
>during probe for each and every clock, resolve the clock control
>flags using SCMI_CLOCK_ATTRIBUTES when the clock control flags are
>first used. Because most clock are never used by U-Boot, this allows
>reducing the amount of SCMI_CLOCK_ATTRIBUTES considerably, and this
>improve probe time of the scmi clock driver and U-Boot start up time.
>
>On Renesas X5H, with 1700+ SCMI clock, the boot time improved by 1.7s .
>
> 
> static int scmi_clk_get_ctrl_flags(struct clk *clk, u32 *ctrl_flags)
> {
>+	struct udevice *dev = clk->dev->parent;

I will change this to "clk->dev", otherwise there is CI failure.

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.

Thanks,
Peng.

> 	struct clk_scmi *clkscmi;
>+	u32 attributes;
> 	struct clk *c;
> 	int ret;


More information about the U-Boot mailing list