Thread (36 messages) flat view 36 messages, 6 authors, 2022-01-29

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

From: Lorenzo Pieralisi <hidden>
Date: 2020-07-23 16:23:29
Also in: linux-mediatek, linux-pci, linux-renesas-soc, linux-rockchip, linux-tegra
Subsystem: pci driver for synopsys designware, pci native host bridge and endpoint drivers, pci subsystem, the rest · Maintainers: Jingoo Han, Manivannan Sadhasivam, Lorenzo Pieralisi, Krzysztof Wilczyński, Bjorn Helgaas, Linus Torvalds

On Thu, Jul 23, 2020 at 09:26:01AM -0600, Rob Herring wrote:
On Tue, Jul 21, 2020 at 8:25 PM Rob Herring [off-list ref] wrote:
quoted
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@gmail.com>
Cc: Gustavo Pimentel <redacted>
Cc: Lorenzo Pieralisi <redacted>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Will Deacon <will@kernel.org>
Cc: Thierry Reding <redacted>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Linus Walleij <redacted>
Cc: Ryder Lee <ryder.lee@mediatek.com>
Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-tegra@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 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;
                }
        }
quoted
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;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help