Re: [PATCH 2/2] PCI: ultrarisc: get and enable DP1000 PCIe clocks

From: Jia Wang

Date: Thu Jul 02 2026 - 01:59:06 EST


On 2026-06-30 11:55 -0500, Bjorn Helgaas wrote:
> On Mon, Jun 29, 2026 at 01:59:51PM +0800, Jia Wang via B4 Relay wrote:
> > From: Jia Wang <wangjia@xxxxxxxxxxxxx>
> >
> > Add the required core, dbi, and aux clocks for the DP1000 PCIe
> > controller and enable them before initializing the DesignWare host.
>
> > +static int ultrarisc_pcie_init_clks(struct ultrarisc_pcie *ultra)
> > +{
> > + struct device *dev = ultra->pci.dev;
> > + int ret;
> > +
> > + ultra->clks[0].id = "core";
> > + ultra->clks[1].id = "dbi";
> > + ultra->clks[2].id = "aux";
> > +
> > + ret = devm_clk_bulk_get(dev, ARRAY_SIZE(ultra->clks), ultra->clks);
> > + if (ret)
> > + return dev_err_probe(dev, ret, "Failed to get clocks\n");
>
> This would be the first use of devm_clk_bulk_get() in drivers/pci.
> There are several users of devm_clk_bulk_get_all(), which looks pretty
> similar. Unless there's a specific reason to use devm_clk_bulk_get(),
> could this use devm_clk_bulk_get_all() instead?
>

Thanks for the review.

I used devm_clk_bulk_get() intentionally because I wanted the driver to
enforce the fixed clock names required by the binding.

That said, if you prefer following the existing drivers/pci pattern, I can
switch to devm_clk_bulk_get_all() in v2.

Best regards,
Jia Wang