Re: [PATCH] PCI: dwc: Move forward the iATU detection process

From: Rob Herring
Date: Fri Mar 05 2021 - 11:19:46 EST


On Sun, Jan 24, 2021 at 10:39 PM Zhiqiang Hou <Zhiqiang.Hou@xxxxxxx> wrote:
>
> From: Hou Zhiqiang <Zhiqiang.Hou@xxxxxxx>
>
> 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 281f1f99cf3a ("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: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows")
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@xxxxxxx>
> ---
> drivers/pci/controller/dwc/pcie-designware-ep.c | 2 ++
> drivers/pci/controller/dwc/pcie-designware-host.c | 2 ++
> drivers/pci/controller/dwc/pcie-designware.c | 11 ++++++++---
> drivers/pci/controller/dwc/pcie-designware.h | 1 +
> 4 files changed, 13 insertions(+), 3 deletions(-)

Reviewed-by: Rob Herring <robh@xxxxxxxxxx>

Bjorn, can you pick this up for 5.12. Lorenzo is on holiday.

Rob