PCI: designware: Update PCI config space remap function
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: Jingoo Han <jingoohan1@gmail.com> Cc: Joao Pinto <Joao.Pinto@synopsys.com>
This commit is contained in:
Родитель
868564da65
Коммит
cc7b0d4955
|
@ -338,8 +338,9 @@ int dw_pcie_host_init(struct pcie_port *pp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pci->dbi_base) {
|
if (!pci->dbi_base) {
|
||||||
pci->dbi_base = devm_ioremap(dev, pp->cfg->start,
|
pci->dbi_base = devm_pci_remap_cfgspace(dev,
|
||||||
resource_size(pp->cfg));
|
pp->cfg->start,
|
||||||
|
resource_size(pp->cfg));
|
||||||
if (!pci->dbi_base) {
|
if (!pci->dbi_base) {
|
||||||
dev_err(dev, "error with ioremap\n");
|
dev_err(dev, "error with ioremap\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
@ -350,8 +351,8 @@ int dw_pcie_host_init(struct pcie_port *pp)
|
||||||
pp->mem_base = pp->mem->start;
|
pp->mem_base = pp->mem->start;
|
||||||
|
|
||||||
if (!pp->va_cfg0_base) {
|
if (!pp->va_cfg0_base) {
|
||||||
pp->va_cfg0_base = devm_ioremap(dev, pp->cfg0_base,
|
pp->va_cfg0_base = devm_pci_remap_cfgspace(dev,
|
||||||
pp->cfg0_size);
|
pp->cfg0_base, pp->cfg0_size);
|
||||||
if (!pp->va_cfg0_base) {
|
if (!pp->va_cfg0_base) {
|
||||||
dev_err(dev, "error with ioremap in function\n");
|
dev_err(dev, "error with ioremap in function\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
@ -360,7 +361,8 @@ int dw_pcie_host_init(struct pcie_port *pp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pp->va_cfg1_base) {
|
if (!pp->va_cfg1_base) {
|
||||||
pp->va_cfg1_base = devm_ioremap(dev, pp->cfg1_base,
|
pp->va_cfg1_base = devm_pci_remap_cfgspace(dev,
|
||||||
|
pp->cfg1_base,
|
||||||
pp->cfg1_size);
|
pp->cfg1_size);
|
||||||
if (!pp->va_cfg1_base) {
|
if (!pp->va_cfg1_base) {
|
||||||
dev_err(dev, "error with ioremap\n");
|
dev_err(dev, "error with ioremap\n");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче