Re: [PATCH v2 3/8] clk: clocking-wizard: Move clk_in1 acquisition before static-config check

"Datta, Shubhrajyoti" <[email protected]> Wed, 29 Jul 2026 21:21:43 +0530
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>

On 7/9/2026 4:55 PM, [email protected] wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Unmet dependency on `s_axi_aclk` in static-config mode causes probe failure.
> --
>
> --- Patch [3]: [PATCH v2 3/8] clk: clocking-wizard: Move clk_in1 acquisition before static-config check ---
> commit 2d23efc5eb24a84c2dc3c21068e9e68c699593d8
> Author: Shubhrajyoti Datta <[email protected]>
>
> clk: clocking-wizard: Move clk_in1 acquisition before static-config check
>
> The clk_in1 is the input clock for both the dynamic reconfig and the
> static-config paths. Acquire clk_in1 for static-config as well. Output
> clocks are registered as fixed-factor children of clk_in1.
>
>> diff --git a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
>> index e082051221bef..ffc78c90bee6f 100644
>> --- a/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
>> +++ b/drivers/clk/xilinx/clk-xlnx-clock-wizard.c
>> @@ -1178,6 +1178,11 @@ static int clk_wzrd_probe(struct platform_device *pdev)
>>                return -EINVAL;
>>        }
>>
>> +     clk_wzrd->clk_in1 = devm_clk_get(&pdev->dev, "clk_in1");
>> +     if (IS_ERR(clk_wzrd->clk_in1))
>> +             return dev_err_probe(&pdev->dev, PTR_ERR(clk_wzrd->clk_in1),
>> +                                  "failed to get clk_in1\n");
>> +
> [Severity: High]
> Does this probe sequence correctly handle devices using xlnx,static-config
> without an s_axi_aclk?
>
> Earlier in clk_wzrd_probe(), the driver unconditionally acquires s_axi_aclk:
>
> drivers/clk/xilinx/clk-xlnx-clock-wizard.c:clk_wzrd_probe() {
>      ...
>      clk_wzrd->axi_clk = devm_clk_get_enabled(&pdev->dev, "s_axi_aclk");
>      if (IS_ERR(clk_wzrd->axi_clk))
>          return dev_err_probe(&pdev->dev, PTR_ERR(clk_wzrd->axi_clk),
>                               "s_axi_aclk not found\n");
>      ...
> }
>
> If a device tree specifies xlnx,static-config and omits the s_axi_aclk clock,
> wouldn't this unconditional acquisition return -ENOENT and cause the probe to
> fail before it even reaches this new clk_in1 acquisition?

For static config the axi_aclk is skiped in below patch.

[PATCH v2 5/8] clk: clocking-wizard: Skip s_axi_aclk for static-config - 
Shubhrajyoti Datta 
<https://lore.kernel.org/all/[email protected]/> 

>
>>        if (!of_property_present(np, "xlnx,static-config")) {
>>                clk_wzrd->base = devm_platform_ioremap_resource(pdev, 0);
>>                if (IS_ERR(clk_wzrd->base))
> [ ... ]
>
> --
> Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3