mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Tim Harvey <tharvey@gateworks.com>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Rob Herring" <robh@kernel.org>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org,
	"open list" <linux-kernel@vger.kernel.org>,
	"Richard Zhu" <hongxing.zhu@nxp.com>
Subject: Re: [PATCH] PCI: imx: do not remap invalid res
Date: Fri, 3 Dec 2021 14:28:31 -0600	[thread overview]
Message-ID: <20211203202831.GA3020182@bhelgaas> (raw)
In-Reply-To: <CAJ+vNU2Pfwz5e0Jj6c5npceOwuNTB_dTVuL4NMD2qxr0CGyeGQ@mail.gmail.com>

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

  parent reply	other threads:[~2021-12-03 20:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 18:02 Tim Harvey
2021-12-01 22:06 ` Tim Harvey
2021-12-02  0:48   ` Hongxing Zhu
2021-12-02  2:41     ` Rob Herring
2021-12-03 20:28   ` Bjorn Helgaas [this message]
2021-12-03 20:49     ` Tim Harvey
2021-12-01 23:46 ` Rob Herring
2021-12-02  9:43 ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211203202831.GA3020182@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=hongxing.zhu@nxp.com \
    --cc=jingoohan1@gmail.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh@kernel.org \
    --cc=tharvey@gateworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®