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

From: Bjorn Helgaas

Date: Thu Jul 09 2026 - 15:50:40 EST


On Thu, Jul 02, 2026 at 01:58:41PM +0800, Jia Wang wrote:
> 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?
>
> I used devm_clk_bulk_get() intentionally because I wanted the driver to
> enforce the fixed clock names required by the binding.

Seems like a plausible reason that might apply to other drivers as
well. Any opinions?