Skip to content

Commit 8bf3ad7

Browse files
PCI: qcom: Implement .assert_perst()
Add support for assert_perst() for switches like TC9563, which require configuration before the PCIe link is established. Such devices use this function op to assert PERST# before configuring the device and once the configuration is done they de-assert PERST#. Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20251101-tc9563-v9-5-de3429f7787a@oss.qualcomm.com
1 parent 3445d38 commit 8bf3ad7

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,18 @@ static int qcom_pcie_post_init_1_0_0(struct qcom_pcie *pcie)
696696
return 0;
697697
}
698698

699+
static int qcom_pcie_assert_perst(struct dw_pcie *pci, bool assert)
700+
{
701+
struct qcom_pcie *pcie = to_qcom_pcie(pci);
702+
703+
if (assert)
704+
qcom_ep_reset_assert(pcie);
705+
else
706+
qcom_ep_reset_deassert(pcie);
707+
708+
return 0;
709+
}
710+
699711
static void qcom_pcie_2_3_2_ltssm_enable(struct qcom_pcie *pcie)
700712
{
701713
u32 val;
@@ -1516,6 +1528,7 @@ static const struct qcom_pcie_cfg cfg_fw_managed = {
15161528
static const struct dw_pcie_ops dw_pcie_ops = {
15171529
.link_up = qcom_pcie_link_up,
15181530
.start_link = qcom_pcie_start_link,
1531+
.assert_perst = qcom_pcie_assert_perst,
15191532
};
15201533

15211534
static int qcom_pcie_icc_init(struct qcom_pcie *pcie)

0 commit comments

Comments
 (0)