]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: qcom: Add .get_ltssm() callback to query LTSSM status
authorKrishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Wed, 29 Apr 2026 06:42:24 +0000 (12:12 +0530)
committerManivannan Sadhasivam <mani@kernel.org>
Thu, 21 May 2026 15:02:57 +0000 (20:32 +0530)
commit131a93dbcb9546683384e31dc4057d4aaf38fa21
treecb8ee775cad095528bac5b9bd75566b625980fc0
parent1d2a29ccd3a17d8e3ab8c3a4821b96d19c799b12
PCI: qcom: Add .get_ltssm() callback to query LTSSM status

For older SoCs like SC7280, reading DBI LTSSM register after sending
PME_Turn_Off message causes NOC error.

To avoid unsafe DBI accesses, introduce qcom_pcie_get_ltssm() to retrieve
the LTSSM state without DBI. For newer platforms, read the LTSSM state from
the PARF_LTSSM register; for older platforms continue to retrieve it from
ELBI_SYS_STTS.

This helper is used in place of direct DBI-based link state checks in the
D3cold path after sending PME_Turn_Off message, ensuring the LTSSM state
can be queried safely even after DBI access is no longer valid.

Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
[mani: commit log and fixed get_ltssm() check]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260429-d3cold-v5-2-89e9735b9df6@oss.qualcomm.com
drivers/pci/controller/dwc/pcie-qcom.c