All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org>
Cc: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Jonathan Hunter
	<jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 06/15] PCI: tegra: Use pci_host_probe() to register host
Date: Fri, 22 May 2020 17:48:23 -0600	[thread overview]
Message-ID: <20200522234832.954484-7-robh@kernel.org> (raw)
In-Reply-To: <20200522234832.954484-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

The tegra host driver does the same host registration and bus scanning
calls as pci_host_probe, so let's use it instead.

Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/pci/controller/pci-tegra.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index e3e917243e10..3cae96dfe75d 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2670,7 +2670,6 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct pci_host_bridge *host;
 	struct tegra_pcie *pcie;
-	struct pci_bus *child;
 	struct resource *bus;
 	int err;
 
@@ -2721,20 +2720,12 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	host->map_irq = tegra_pcie_map_irq;
 	host->swizzle_irq = pci_common_swizzle;
 
-	err = pci_scan_root_bus_bridge(host);
+	err = pci_host_probe(host);
 	if (err < 0) {
 		dev_err(dev, "failed to register host: %d\n", err);
 		goto pm_runtime_put;
 	}
 
-	pci_bus_size_bridges(host->bus);
-	pci_bus_assign_resources(host->bus);
-
-	list_for_each_entry(child, &host->bus->children, node)
-		pcie_bus_configure_settings(child);
-
-	pci_bus_add_devices(host->bus);
-
 	if (IS_ENABLED(CONFIG_DEBUG_FS)) {
 		err = tegra_pcie_debugfs_init(pcie);
 		if (err < 0)
-- 
2.25.1

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org
Subject: [PATCH 06/15] PCI: tegra: Use pci_host_probe() to register host
Date: Fri, 22 May 2020 17:48:23 -0600	[thread overview]
Message-ID: <20200522234832.954484-7-robh@kernel.org> (raw)
In-Reply-To: <20200522234832.954484-1-robh@kernel.org>

The tegra host driver does the same host registration and bus scanning
calls as pci_host_probe, so let's use it instead.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/pci/controller/pci-tegra.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index e3e917243e10..3cae96dfe75d 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2670,7 +2670,6 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct pci_host_bridge *host;
 	struct tegra_pcie *pcie;
-	struct pci_bus *child;
 	struct resource *bus;
 	int err;
 
@@ -2721,20 +2720,12 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	host->map_irq = tegra_pcie_map_irq;
 	host->swizzle_irq = pci_common_swizzle;
 
-	err = pci_scan_root_bus_bridge(host);
+	err = pci_host_probe(host);
 	if (err < 0) {
 		dev_err(dev, "failed to register host: %d\n", err);
 		goto pm_runtime_put;
 	}
 
-	pci_bus_size_bridges(host->bus);
-	pci_bus_assign_resources(host->bus);
-
-	list_for_each_entry(child, &host->bus->children, node)
-		pcie_bus_configure_settings(child);
-
-	pci_bus_add_devices(host->bus);
-
 	if (IS_ENABLED(CONFIG_DEBUG_FS)) {
 		err = tegra_pcie_debugfs_init(pcie);
 		if (err < 0)
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: linux-pci@vger.kernel.org, Jonathan Hunter <jonathanh@nvidia.com>,
	linux-tegra@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 06/15] PCI: tegra: Use pci_host_probe() to register host
Date: Fri, 22 May 2020 17:48:23 -0600	[thread overview]
Message-ID: <20200522234832.954484-7-robh@kernel.org> (raw)
In-Reply-To: <20200522234832.954484-1-robh@kernel.org>

The tegra host driver does the same host registration and bus scanning
calls as pci_host_probe, so let's use it instead.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/pci/controller/pci-tegra.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index e3e917243e10..3cae96dfe75d 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2670,7 +2670,6 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct pci_host_bridge *host;
 	struct tegra_pcie *pcie;
-	struct pci_bus *child;
 	struct resource *bus;
 	int err;
 
@@ -2721,20 +2720,12 @@ static int tegra_pcie_probe(struct platform_device *pdev)
 	host->map_irq = tegra_pcie_map_irq;
 	host->swizzle_irq = pci_common_swizzle;
 
-	err = pci_scan_root_bus_bridge(host);
+	err = pci_host_probe(host);
 	if (err < 0) {
 		dev_err(dev, "failed to register host: %d\n", err);
 		goto pm_runtime_put;
 	}
 
-	pci_bus_size_bridges(host->bus);
-	pci_bus_assign_resources(host->bus);
-
-	list_for_each_entry(child, &host->bus->children, node)
-		pcie_bus_configure_settings(child);
-
-	pci_bus_add_devices(host->bus);
-
 	if (IS_ENABLED(CONFIG_DEBUG_FS)) {
 		err = tegra_pcie_debugfs_init(pcie);
 		if (err < 0)
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-05-22 23:48 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 23:48 [PATCH 00/15] PCI controller probe cleanups Rob Herring
2020-05-22 23:48 ` Rob Herring
2020-05-22 23:48 ` [PATCH 01/15] PCI: cadence: Use struct pci_host_bridge.windows list directly Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 02/15] PCI: mvebu: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 03/15] PCI: host-common: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 04/15] PCI: brcmstb: Use pci_host_probe() to register host Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-06-18 10:54   ` Nicolas Saenz Julienne
2020-06-18 10:54     ` Nicolas Saenz Julienne
2020-05-22 23:48 ` [PATCH 05/15] PCI: mobiveil: " Rob Herring
2020-05-22 23:48   ` Rob Herring
     [not found] ` <20200522234832.954484-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2020-05-22 23:48   ` Rob Herring [this message]
2020-05-22 23:48     ` [PATCH 06/15] PCI: tegra: " Rob Herring
2020-05-22 23:48     ` Rob Herring
2020-05-22 23:48 ` [PATCH 07/15] PCI: v3: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-25 11:38   ` Linus Walleij
2020-05-25 11:38     ` Linus Walleij
2020-05-22 23:48 ` [PATCH 08/15] PCI: versatile: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 09/15] PCI: xgene: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 10/15] PCI: altera: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-06-02  1:02   ` Tan, Ley Foon
2020-06-02  1:02     ` Tan, Ley Foon
2020-05-22 23:48 ` [PATCH 11/15] PCI: iproc: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-28 17:53   ` Scott Branden
2020-05-28 17:53     ` Scott Branden
2020-05-22 23:48 ` [PATCH 12/15] PCI: rcar: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-25  8:31   ` Geert Uytterhoeven
2020-05-25  8:31     ` Geert Uytterhoeven
2020-05-22 23:48 ` [PATCH 13/15] PCI: rockchip: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-22 23:48 ` [PATCH 14/15] PCI: xilinx-nwl: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-25  6:44   ` Michal Simek
2020-05-25  6:44     ` Michal Simek
2020-05-22 23:48 ` [PATCH 15/15] PCI: xilinx: " Rob Herring
2020-05-22 23:48   ` Rob Herring
2020-05-25  6:44   ` Michal Simek
2020-05-25  6:44     ` Michal Simek
2020-07-06  9:04 ` [PATCH 00/15] PCI controller probe cleanups Lorenzo Pieralisi
2020-07-06  9:04   ` 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=20200522234832.954484-7-robh@kernel.org \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lorenzo.pieralisi-5wv7dgnIgG8@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.