File tree Expand file tree Collapse file tree
drivers/pci/controller/dwc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 135135
136136/* PARF_LTSSM register fields */
137137#define LTSSM_EN BIT(8)
138+ #define PARF_LTSSM_STATE_MASK GENMASK(5, 0)
138139
139140/* PARF_INT_ALL_{STATUS/CLEAR/MASK} register fields */
140141#define PARF_INT_ALL_LINK_UP BIT(13)
@@ -1259,6 +1260,15 @@ static bool qcom_pcie_link_up(struct dw_pcie *pci)
12591260 return val & PCI_EXP_LNKSTA_DLLLA ;
12601261}
12611262
1263+ static enum dw_pcie_ltssm qcom_pcie_get_ltssm (struct dw_pcie * pci )
1264+ {
1265+ struct qcom_pcie * pcie = to_qcom_pcie (pci );
1266+ u32 val ;
1267+
1268+ val = readl (pcie -> parf + PARF_LTSSM );
1269+ return (enum dw_pcie_ltssm )FIELD_GET (PARF_LTSSM_STATE_MASK , val );
1270+ }
1271+
12621272static void qcom_pcie_phy_power_off (struct qcom_pcie * pcie )
12631273{
12641274 struct qcom_pcie_port * port ;
@@ -1517,6 +1527,7 @@ static const struct qcom_pcie_cfg cfg_fw_managed = {
15171527static const struct dw_pcie_ops dw_pcie_ops = {
15181528 .link_up = qcom_pcie_link_up ,
15191529 .start_link = qcom_pcie_start_link ,
1530+ .get_ltssm = qcom_pcie_get_ltssm ,
15201531};
15211532
15221533static int qcom_pcie_icc_init (struct qcom_pcie * pcie )
You can’t perform that action at this time.
0 commit comments