diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-09-02 22:56:48 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-09-02 22:56:48 +0300 |
commit | c1bb1449fa8e3e769c0e7a5861bb49974fe63fb0 (patch) | |
tree | b138b140c08dabe9292718c45365f448e71b9a58 /drivers/pci/controller | |
parent | a1e4ca8eb963f58fc9c2c26a971d86456ea717f5 (diff) | |
parent | aeaea8969b402e0081210cc9144404d13996efed (diff) | |
download | linux-c1bb1449fa8e3e769c0e7a5861bb49974fe63fb0.tar.xz |
Merge branch 'remotes/lorenzo/pci/iproc'
- Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' (Rob Herring)
- Fix BCMA probe resource handling (Rob Herring)
* remotes/lorenzo/pci/iproc:
PCI: iproc: Fix BCMA probe resource handling
PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges'
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r-- | drivers/pci/controller/pcie-iproc-bcma.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/pci/controller/pcie-iproc-bcma.c b/drivers/pci/controller/pcie-iproc-bcma.c index 56b8ee7bf330..f918c713afb0 100644 --- a/drivers/pci/controller/pcie-iproc-bcma.c +++ b/drivers/pci/controller/pcie-iproc-bcma.c @@ -35,7 +35,6 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) { struct device *dev = &bdev->dev; struct iproc_pcie *pcie; - LIST_HEAD(resources); struct pci_host_bridge *bridge; int ret; @@ -60,19 +59,16 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) pcie->mem.end = bdev->addr_s[0] + SZ_128M - 1; pcie->mem.name = "PCIe MEM space"; pcie->mem.flags = IORESOURCE_MEM; - pci_add_resource(&resources, &pcie->mem); + pci_add_resource(&bridge->windows, &pcie->mem); + ret = devm_request_pci_bus_resources(dev, &bridge->windows); + if (ret) + return ret; pcie->map_irq = iproc_pcie_bcma_map_irq; - ret = iproc_pcie_setup(pcie, &resources); - if (ret) { - dev_err(dev, "PCIe controller setup failed\n"); - pci_free_resource_list(&resources); - return ret; - } - bcma_set_drvdata(bdev, pcie); - return 0; + + return iproc_pcie_setup(pcie, &bridge->windows); } static void iproc_pcie_bcma_remove(struct bcma_device *bdev) |