lkml.org 
[lkml]   [2021]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] PCI: imx: do not remap invalid res
On Fri, Dec 3, 2021 at 12:28 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Wed, Dec 01, 2021 at 02:06:44PM -0800, Tim Harvey wrote:
> > On Mon, Nov 1, 2021 at 11:03 AM Tim Harvey <tharvey@gateworks.com> wrote:
> > >
> > > On imx6 and perhaps others when pcie probes you get a:
> > > imx6q-pcie 33800000.pcie: invalid resource
> > >
> > > This occurs because the atu is not specified in the DT and as such it
> > > should not be remapped.
> > >
> > > Cc: Richard Zhu <hongxing.zhu@nxp.com>
> > > Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> > > ---
> > > drivers/pci/controller/dwc/pcie-designware.c | 7 ++++---
> > > 1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/pci/controller/dwc/pcie-designware.c b/drivers/pci/controller/dwc/pcie-designware.c
> > > index a945f0c0e73d..3254f60d1713 100644
> > > --- a/drivers/pci/controller/dwc/pcie-designware.c
> > > +++ b/drivers/pci/controller/dwc/pcie-designware.c
> > > @@ -671,10 +671,11 @@ void dw_pcie_iatu_detect(struct dw_pcie *pci)
> > > if (!pci->atu_base) {
> > > struct resource *res =
> > > platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
> > > - if (res)
> > > + if (res) {
> > > pci->atu_size = resource_size(res);
> > > - pci->atu_base = devm_ioremap_resource(dev, res);
> > > - if (IS_ERR(pci->atu_base))
> > > + pci->atu_base = devm_ioremap_resource(dev, res);
> > > + }
> > > + if (!pci->atu_base || IS_ERR(pci->atu_base))
> > > pci->atu_base = pci->dbi_base + DEFAULT_DBI_ATU_OFFSET;
> > > }
> > >
> > > --
> > > 2.17.1
> > >
> >
> > ping - any feedback on this?
>
> Looks like Lorenzo corrected the subject line for you and applied it:
>
> https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?id=6e5ebc96ec65

Yes, I saw that. Thanks everyone!

Best regards,

Tim

\
 
 \ /
  Last update: 2021-12-03 21:50    [W:0.617 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site