Re: [PATCH 11/19] PCI: Move setting pci_host_bridge.busnr out of host drivers

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

 



On Thu, Jul 23, 2020 at 09:26:01AM -0600, Rob Herring wrote:
> On Tue, Jul 21, 2020 at 8:25 PM Rob Herring <robh@xxxxxxxxxx> wrote:
> >
> > Most host drivers only parse the DT bus range to set the root bus number
> > in pci_host_bridge.busnr. The ones that don't set busnr are buggy in
> > that they ignore what's in DT. Let's set busnr in pci_scan_root_bus_bridge()
> > where we already check for the bus resource and remove setting it in
> > host drivers.
> >
> > Cc: Jingoo Han <jingoohan1@xxxxxxxxx>
> > Cc: Gustavo Pimentel <gustavo.pimentel@xxxxxxxxxxxx>
> > Cc: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
> > Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> > Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>
> > Cc: Will Deacon <will@xxxxxxxxxx>
> > Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
> > Cc: Jonathan Hunter <jonathanh@xxxxxxxxxx>
> > Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > Cc: Ryder Lee <ryder.lee@xxxxxxxxxxxx>
> > Cc: Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
> > Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > Cc: linux-tegra@xxxxxxxxxxxxxxx
> > Cc: linux-mediatek@xxxxxxxxxxxxxxxxxxx
> > Cc: linux-renesas-soc@xxxxxxxxxxxxxxx
> > Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> > ---
> >  drivers/pci/controller/dwc/pcie-designware-host.c | 4 ----
> >  drivers/pci/controller/dwc/pcie-designware.h      | 1 -
> >  drivers/pci/controller/pci-aardvark.c             | 5 ++---
> >  drivers/pci/controller/pci-host-common.c          | 1 -
> >  drivers/pci/controller/pci-tegra.c                | 4 +---
> >  drivers/pci/controller/pci-v3-semi.c              | 2 --
> >  drivers/pci/controller/pcie-mediatek.c            | 8 +-------
> >  drivers/pci/controller/pcie-rcar-host.c           | 1 -
> >  drivers/pci/probe.c                               | 1 +
> >  9 files changed, 5 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> > index 9e8a9cfc6d3a..fa922cb876a3 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> > +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> > @@ -374,9 +374,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
> >                         pp->cfg0_base = pp->cfg->start;
> >                         pp->cfg1_base = pp->cfg->start + pp->cfg0_size;
> >                         break;
> > -               case IORESOURCE_BUS:
> > -                       pp->busn = win->res;
> > -                       break;
> >                 }
> >         }
> >
> 
> > diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h
> > index fd2146298b58..9fb44290ed43 100644
> > --- a/drivers/pci/controller/dwc/pcie-designware.h
> > +++ b/drivers/pci/controller/dwc/pcie-designware.h
> > @@ -188,7 +188,6 @@ struct pcie_port {
> >         struct resource         *cfg;
> >         struct resource         *io;
> >         struct resource         *mem;
> > -       struct resource         *busn;
> >         int                     irq;
> >         const struct dw_pcie_host_ops *ops;
> >         int                     msi_irq;
> 
> These 2 hunks should be dropped as they are breaking the Amazon driver.
> 
> Lorenzo, do you want to fixup or I can send a fix?

Done (I have not removed the hunk below though):

diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 9e8a9cfc6d3a..9775558acdc8 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -474,7 +474,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
 	}

 	bridge->sysdata = pp;
-	bridge->busnr = pp->busn->start;
 	bridge->ops = &dw_pcie_ops;
 	bridge->map_irq = of_irq_parse_and_map_pci;
 	bridge->swizzle_irq = pci_common_swizzle;



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux