summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorHou Zhiqiang2019-07-05 11:56:31 +0200
committerLorenzo Pieralisi2019-07-08 12:23:13 +0200
commitf99536e9d2f55996038158a6559d4254a7cc1693 (patch)
tree43b838627ba851d25cdac7c6d0808a65aae259c9 /drivers/pci
parentPCI: mobiveil: Remove the flag MSI_FLAG_MULTI_PCI_MSI (diff)
downloadkernel-qcow2-linux-f99536e9d2f55996038158a6559d4254a7cc1693.tar.gz
kernel-qcow2-linux-f99536e9d2f55996038158a6559d4254a7cc1693.tar.xz
kernel-qcow2-linux-f99536e9d2f55996038158a6559d4254a7cc1693.zip
PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows
The outbound memory windows PCI base addresses should be taken from the 'ranges' property of DT node to setup MEM/IO outbound windows decoding correctly instead of being hardcoded to zero. Update the code to retrieve the PCI base address for each range and use it to program the outbound windows address decoders Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver") Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Minghuan Lian <Minghuan.Lian@nxp.com> Reviewed-by: Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/controller/pcie-mobiveil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c
index e5819029ad8e..53df31700551 100644
--- a/drivers/pci/controller/pcie-mobiveil.c
+++ b/drivers/pci/controller/pcie-mobiveil.c
@@ -621,8 +621,9 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)
if (type) {
/* configure outbound translation window */
program_ob_windows(pcie, pcie->ob_wins_configured,
- win->res->start, 0, type,
- resource_size(win->res));
+ win->res->start,
+ win->res->start - win->offset,
+ type, resource_size(win->res));
}
}