From: Hou Zhiqiang Date: Fri, 5 Jul 2019 09:56:31 +0000 (+0800) Subject: PCI: mobiveil: Fix PCI base address in MEM/IO outbound windows X-Git-Tag: v5.3-rc1~78^2~7^2~24 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f99536e9d2f55996038158a6559d4254a7cc1693;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Lorenzo Pieralisi Reviewed-by: Minghuan Lian Reviewed-by: Subrahmanya Lingappa --- diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c index e5819029ad8e6..53df31700551f 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)); } }