Re: [PATCH] PCI: dwc ep: cache config until DBI regs available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-11-20 at 10:41 -0700, Stephen Warren wrote:
> On 11/20/18 10:30 AM, Vidya Sagar wrote:
> > > 
> > > Some implementations of the DWC PCIe endpoint controller do not allow access
> > > to DBI registers until the attached host has started REFCLK, released PERST, and
> > > the endpoint driver has initialized clocking of the DBI registers based on that.
> > > 

> a) Update every existing DWC EP driver to set ep->hw_regs_available 
> during probe/initialization.

I believe on IMX7d, it is also the case that access to DWC PCIe
controller without PCI REFCLK causes a system hang.

We had a design with a mistake that didn't provide a REFCLK, and a hang
 starting the dwc controller is what happened.  It was fixed with an
external PCIe clock chip to provide the REFCLK input (as imx7d is
designed to expect), which, for the clock chip we used and the rest of
the external clock tree, means the REFCLK is there before Linux boots.

But there's no reason that must be the case.  Maybe the external clock
chip is I2C controlled and needs to be enabled?  And maybe I only want
to do that if PCI-e is to be used?

So I don't think if this is a specific problem for nvidia.

But I wonder, why can't you add REFCLK to the Linux clock tree and the
dwc bindings, and have the dwc driver EPROBE_DEFER if it can't
clk_prepare_enable() the refclk?




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux