aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-versatile.c
diff options
context:
space:
mode:
authorRob Herring <[email protected]>2020-07-22 02:25:13 +0000
committerLorenzo Pieralisi <[email protected]>2020-08-04 15:36:30 +0000
commit669cbc708122fc7a02282058a09f096200cee090 (patch)
tree315d5fda2017bb9284de44cfcd4319f6e68cbe3e /drivers/pci/controller/pci-versatile.c
parentPCI: rcar-gen2: Convert to use modern host bridge probe functions (diff)
downloadkernel-669cbc708122fc7a02282058a09f096200cee090.tar.gz
kernel-669cbc708122fc7a02282058a09f096200cee090.zip
PCI: Move DT resource setup into devm_pci_alloc_host_bridge()
Now that pci_parse_request_of_pci_ranges() callers just setup pci_host_bridge.windows and dma_ranges directly and don't need the bus range returned, we can just initialize them when allocating the pci_host_bridge struct. With this, pci_parse_request_of_pci_ranges() becomes a static function. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Cc: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-versatile.c')
-rw-r--r--drivers/pci/controller/pci-versatile.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c
index 66f5c61b8eb8..fb45f8d158fe 100644
--- a/drivers/pci/controller/pci-versatile.c
+++ b/drivers/pci/controller/pci-versatile.c
@@ -67,7 +67,7 @@ static int versatile_pci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct resource *res;
struct resource_entry *entry;
- int ret, i, myslot = -1, mem = 1;
+ int i, myslot = -1, mem = 1;
u32 val;
void __iomem *local_pci_cfg_base;
struct pci_host_bridge *bridge;
@@ -89,11 +89,6 @@ static int versatile_pci_probe(struct platform_device *pdev)
if (IS_ERR(versatile_cfg_base[1]))
return PTR_ERR(versatile_cfg_base[1]);
- ret = pci_parse_request_of_pci_ranges(dev, &bridge->windows,
- NULL, NULL);
- if (ret)
- return ret;
-
resource_list_for_each_entry(entry, &bridge->windows) {
if (resource_type(entry->res) == IORESOURCE_MEM) {
writel(entry->res->start >> 28, PCI_IMAP(mem));