Skip to content

Commit f899983

Browse files
Vidya Sagarbjorn-helgaas
authored andcommitted
PCI: tegra194: Extend Endpoint mode support
Since only Controller-5 can be used in the Endpoint mode in P2972-0000 platform, support is available only for Controller-5. Extend that support by enabling the Endpoint mode capable controller during initialization which otherwise is not required if it is only Controller-5. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vidya Sagar <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent e05fd6a commit f899983

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,6 +1650,13 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
16501650
return;
16511651
}
16521652

1653+
ret = tegra_pcie_bpmp_set_ctrl_state(pcie, true);
1654+
if (ret) {
1655+
dev_err(pcie->dev, "Failed to enable controller %u: %d\n",
1656+
pcie->cid, ret);
1657+
goto fail_set_ctrl_state;
1658+
}
1659+
16531660
ret = tegra_pcie_bpmp_set_pll_state(pcie, true);
16541661
if (ret) {
16551662
dev_err(dev, "Failed to init UPHY for PCIe EP: %d\n", ret);
@@ -1798,6 +1805,8 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
17981805
fail_core_clk_enable:
17991806
tegra_pcie_bpmp_set_pll_state(pcie, false);
18001807
fail_pll_init:
1808+
tegra_pcie_bpmp_set_ctrl_state(pcie, false);
1809+
fail_set_ctrl_state:
18011810
pm_runtime_put_sync(dev);
18021811
}
18031812

0 commit comments

Comments
 (0)