msm: ep_pcie: Avoid releasing resources if pcie-perst-enum is set

When link is not up during the enumeration, enumeration fails
and the driver releases resources, disables Perst IRQ. If the
ep_pcie gets a Perst de assertion after this it is not handled,
as Perst IRQ is disabled.

Here, avoiding disabling of Perst IRQ, De-initializing of GPIOs
and making the base addresses of various resources as NULL, if
pcie-perst-enum is set in device tree. This ensures that the
enumeration is done as part of the subsequent Perst de assertion
events.

Change-Id: If5d8ce08031d089b1477d93a2125e3fe0fc97942
Signed-off-by: Sai Chaitanya Kaveti <quic_skaveti@quicinc.com>
This commit is contained in:
Sai Chaitanya Kaveti 2022-05-06 11:46:22 +05:30 • committed by Gerrit - the friendly Code Review server
commit 1175e4cdbf

View file

@ -2324,7 +2324,7 @@ static int ep_pcie_enumeration(struct ep_pcie_dev_t *dev)
EP_PCIE_ERR(&ep_pcie_dev,
"PCIe V%d: the input handler is NULL\n",
ep_pcie_dev.rev);
return EP_PCIE_ERROR;
return -ENODEV;
}
EP_PCIE_DBG(dev,
@ -3503,7 +3503,11 @@ static int ep_pcie_probe(struct platform_device *pdev)
ep_pcie_dev.rev, dev_name(&(pdev->dev)));
ret = ep_pcie_enumeration(&ep_pcie_dev);
if (ret && !ep_pcie_debug_keep_resource)
if (ret == EP_PCIE_ERROR)
EP_PCIE_ERR(&ep_pcie_dev,
"PCIe V%d: Enumeration failed in probe, waiting for Perst deassert\n",
ep_pcie_dev.rev);
if (ret && !ep_pcie_debug_keep_resource & !ep_pcie_dev.perst_enum)
goto irq_deinit;
register_reboot_notifier(&ep_pcie_core_reboot_notifier);