Thread (22 messages) flat view 22 messages, 3 authors, 2021-06-17

Re: [net-next: PATCH v2 4/7] net: mvmdio: simplify clock handling

From: Marcin Wojtas <hidden>
Date: 2021-06-16 23:25:55
Also in: lkml

śr., 16 cze 2021 o 21:48 Andrew Lunn [off-list ref] napisał(a):
quoted
+     dev->clks[0].id = "core";
+     dev->clks[1].id = "mg";
+     dev->clks[2].id = "mg_core";
+     dev->clks[3].id = "axi";
+     ret = devm_clk_bulk_get_optional(&pdev->dev, MVMDIO_CLOCK_COUNT,
+                                      dev->clks);
Kirkwood:

                mdio: mdio-bus@72004 {
                        compatible = "marvell,orion-mdio";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x72004 0x84>;
                        interrupts = <46>;
                        clocks = <&gate_clk 0>;
                        status = "disabled";

Does this work? There is no clock-names in DT.
Neither are the clocks in Armada 7k8k / CN913x:

                CP11X_LABEL(mdio): mdio@12a200 {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        compatible = "marvell,orion-mdio";
                        reg = <0x12a200 0x10>;
                        clocks = <&CP11X_LABEL(clk) 1 9>,
<&CP11X_LABEL(clk) 1 5>,
                                 <&CP11X_LABEL(clk) 1 6>,
<&CP11X_LABEL(clk) 1 18>;
                        status = "disabled";
                };

Apparently I misread the code and got convinced that contrary to
devm_clk_get_optional(), the devm_clk_get_bulk_optional() obtains the
clocks directly by index, not name (on the tested boards, the same
clocks are enabled by the other interfaces, so the problems

I will drop this patch. Thank you for spotting the issue.

Best regards,
Marcin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help