PCI: iproc-platform: Update PCI config space remap function
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 19 Apr 2017 16:49:02 +0000 (17:49 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Apr 2017 18:53:16 +0000 (13:53 -0500)
PCI configuration space should be mapped with a memory region type that
generates on the CPU host bus non-posted write transations. Update the
driver to use the devm_pci_remap_cfg* interface to make sure the correct
memory mappings for PCI configuration space are used.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Jon Mason <jonmason@broadcom.com>
drivers/pci/host/pcie-iproc-platform.c

index f4909bb0b2ad1505c3e084820f36104387add8f5..b48d0dbd7620d78cf5f28976bb75abb9f3c55ce2 100644 (file)
@@ -67,7 +67,8 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
                return ret;
        }
 
-       pcie->base = devm_ioremap(dev, reg.start, resource_size(&reg));
+       pcie->base = devm_pci_remap_cfgspace(dev, reg.start,
+                                            resource_size(&reg));
        if (!pcie->base) {
                dev_err(dev, "unable to map controller registers\n");
                return -ENOMEM;