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? Rob