PCI: xilinx: Update PCI config space remap function
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 19 Apr 2017 16:48:57 +0000 (17:48 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Apr 2017 18:53:14 +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: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
drivers/pci/host/pcie-xilinx.c

index 7f030f5d750bbb52e88d611b80555e852b497a6d..2fe2df51f9f8334774bc0affc7fed90fc03cfd29 100644 (file)
@@ -606,7 +606,7 @@ static int xilinx_pcie_parse_dt(struct xilinx_pcie_port *port)
                return err;
        }
 
-       port->reg_base = devm_ioremap_resource(dev, &regs);
+       port->reg_base = devm_pci_remap_cfg_resource(dev, &regs);
        if (IS_ERR(port->reg_base))
                return PTR_ERR(port->reg_base);