提交 f99536e9 编写于 作者: H Hou Zhiqiang 提交者: Lorenzo Pieralisi

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: 9af6bcb1 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver")
Signed-off-by: NHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: NMinghuan Lian <Minghuan.Lian@nxp.com>
Reviewed-by: NSubrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
上级 a131fb63
...@@ -621,8 +621,9 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) ...@@ -621,8 +621,9 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)
if (type) { if (type) {
/* configure outbound translation window */ /* configure outbound translation window */
program_ob_windows(pcie, pcie->ob_wins_configured, program_ob_windows(pcie, pcie->ob_wins_configured,
win->res->start, 0, type, win->res->start,
resource_size(win->res)); win->res->start - win->offset,
type, resource_size(win->res));
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册