PCI: dwc: Move forward the iATU detection process
In the dw_pcie_ep_init(), it depends on the detected iATU region numbers to allocate the in/outbound window management bit map. It fails after the commit 281f1f99 ("PCI: dwc: Detect number of iATU windows"). So this patch move the iATU region detection into a new function, move forward the detection to the very beginning of functions dw_pcie_host_init() and dw_pcie_ep_init(). And also remove it from the dw_pcie_setup(), since it's more like a software perspective initialization step than hardware setup. Fixes: 281f1f99 ("PCI: dwc: Detect number of iATU windows") Signed-off-by:Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Tested-by:
Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Loading