PCI: mobiveil: Add configured inbound windows counter
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Fri, 5 Jul 2019 09:56:48 +0000 (17:56 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 8 Jul 2019 11:39:09 +0000 (12:39 +0100)
Current code only keeps track of the number of outbound windows
configured but it does not for inbound windows. Add a counter
to keep track of initialized inbound windows.

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>
drivers/pci/controller/pcie-mobiveil.c

index 76653d9464860d5aac406b7c1c0898588a891e75..0560344dc58816ded88d5bb6941c56a7a99c064a 100644 (file)
@@ -481,6 +481,7 @@ static void program_ib_windows(struct mobiveil_pcie *pcie, int win_num,
 
        csr_writel(pcie, pci_addr, PAB_PEX_AMAP_PEX_WIN_L(win_num));
        csr_writel(pcie, 0, PAB_PEX_AMAP_PEX_WIN_H(win_num));
+       pcie->ib_wins_configured++;
 }
 
 /*