diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-22 00:15:05 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-22 00:15:05 +0300 |
commit | 68094b4b8d72360f9a90804c203e4292c6662fdd (patch) | |
tree | 79ab1eb0d6ee4621863680c541b3be67bc662329 /drivers/pci/host | |
parent | e34e38bf891bd7bf7c9305ff1d2e1b29a77dd159 (diff) | |
parent | ce709f86501a013e941e9986cb072eae375ddf3e (diff) | |
download | linux-68094b4b8d72360f9a90804c203e4292c6662fdd.tar.xz |
Merge branch 'pci/host-iproc' into next
* pci/host-iproc:
PCI: Add Broadcom Northstar2 PAXC quirk for device class and MPSS
PCI: iproc: Configure PCIe MPS settings
PCI: iproc: Use of_device_get_match_data() to simplify probe
Diffstat (limited to 'drivers/pci/host')
-rw-r--r-- | drivers/pci/host/pcie-iproc-platform.c | 7 | ||||
-rw-r--r-- | drivers/pci/host/pcie-iproc.c | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c index 22d814a78a78..f4909bb0b2ad 100644 --- a/drivers/pci/host/pcie-iproc-platform.c +++ b/drivers/pci/host/pcie-iproc-platform.c @@ -47,7 +47,6 @@ MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table); static int iproc_pcie_pltfm_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - const struct of_device_id *of_id; struct iproc_pcie *pcie; struct device_node *np = dev->of_node; struct resource reg; @@ -55,16 +54,12 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) LIST_HEAD(res); int ret; - of_id = of_match_device(iproc_pcie_of_match_table, dev); - if (!of_id) - return -EINVAL; - pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) return -ENOMEM; pcie->dev = dev; - pcie->type = (enum iproc_pcie_type)of_id->data; + pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); ret = of_address_to_resource(np, 0, ®); if (ret < 0) { diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index 3ebc025499b9..0f39bd2a04cb 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -1205,7 +1205,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) struct device *dev; int ret; void *sysdata; - struct pci_bus *bus; + struct pci_bus *bus, *child; dev = pcie->dev; @@ -1278,6 +1278,9 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) if (pcie->map_irq) pci_fixup_irqs(pci_common_swizzle, pcie->map_irq); + list_for_each_entry(child, &bus->children, node) + pcie_bus_configure_settings(child); + pci_bus_add_devices(bus); return 0; |