On 10/28/25 12:56 PM, Peng Fan wrote:

Hello Peng,

@@ -325,24 +326,20 @@ static int scmi_clk_probe(struct udevice *dev)
                return -ENOMEM;

        for (i = 0; i < num_clocks; i++) {
-               char *clock_name;
+               clk_scmi = clk_scmi_bulk + i;
+               char *clock_name = clk_scmi->name;
                u32 attributes;

-               if (!scmi_clk_get_attibute(dev, i, &clock_name, &attributes)) {
-                       clk_scmi = clk_scmi_bulk + i;
-                       if (!clock_name)
-                               ret = -ENOMEM;
-                       else
-                               ret = clk_register(&clk_scmi->clk, 
dev->driver->name,
-                                                  clock_name, dev->name);
-
-                       if (ret) {
-                               free(clock_name);
-                               return ret;
-                       }
+               snprintf(clock_name, SCMI_CLOCK_NAME_LENGTH_MAX, "scmi-%zu", i);
+
+               ret = clk_register(&clk_scmi->clk, dev->driver->name,
+                                  clock_name, dev->name);
+               if (ret)
+                       return ret;

-                       dev_clk_dm(dev, i, &clk_scmi->clk);
+               dev_clk_dm(dev, i, &clk_scmi->clk);

+               if (!scmi_clk_get_attibute(dev, i, &clock_name, &attributes)) {

There is still scmi_clk_get_attibute for each clock. In commit log,
you mentioned this takes lot time to complete. I may miss something,
what is improved in this change?
That scmi_clk_get_attribute() is finally deferred in 4/4 , which improves that . I tried to keep the patchset reviewable, so I split the rework into multiple patches.

Reply via email to