mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
PCI: tegra264: Update EP state change handling
When Thor EP is connected to Thor RP, PERST# signal don't get toggle post Thor RP boot. - When EP start is triggered, de-assert EP if RP PERST# is released. - When EP stop is triggered, assert EP directly. Bug 4567932 Change-Id: I86e9251205a7c19dd32789052a10669fc3b48098 Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3170657 Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
4ab2bfd19c
commit
bb8ac1d6be
@@ -500,8 +500,15 @@ static int tegra264_pcie_ep_start(struct pci_epc *epc)
|
||||
{
|
||||
struct tegra264_pcie_ep *pcie = epc_get_drvdata(epc);
|
||||
|
||||
if (pcie->pex_prsnt_gpiod)
|
||||
if (gpiod_get_value_cansleep(pcie->pex_rst_gpiod) == 0U) {
|
||||
dev_dbg(pcie->dev, "RP already started. Starting EP\n");
|
||||
tegra264_pcie_ep_rst_deassert(pcie);
|
||||
}
|
||||
|
||||
if (pcie->pex_prsnt_gpiod) {
|
||||
dev_dbg(pcie->dev, "De-Asserting PRSNT\n");
|
||||
gpiod_set_value_cansleep(pcie->pex_prsnt_gpiod, 1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -510,10 +517,14 @@ static void tegra264_pcie_ep_stop(struct pci_epc *epc)
|
||||
{
|
||||
struct tegra264_pcie_ep *pcie = epc_get_drvdata(epc);
|
||||
|
||||
if (pcie->pex_prsnt_gpiod)
|
||||
if (pcie->pex_prsnt_gpiod) {
|
||||
dev_dbg(pcie->dev, "Asserting PRSNT\n");
|
||||
gpiod_set_value_cansleep(pcie->pex_prsnt_gpiod, 0);
|
||||
}
|
||||
|
||||
tegra264_pcie_ep_rst_assert(pcie);
|
||||
}
|
||||
|
||||
static const struct pci_epc_features tegra264_pcie_epc_features = {
|
||||
.linkup_notifier = true,
|
||||
.core_init_notifier = false,
|
||||
|
||||
Reference in New Issue
Block a user