]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PCI: qcom: Remove custom ASPM enablement code
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Mon, 22 Sep 2025 16:16:45 +0000 (21:46 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Sep 2025 23:07:01 +0000 (18:07 -0500)
Since the PCI subsystem has started enabling all ASPM states for all
devicetree based platforms, the ASPM enablement code from this driver can
now be dropped.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20250922-pci-dt-aspm-v2-2-2a65cf84e326@oss.qualcomm.com
drivers/pci/controller/dwc/pcie-qcom.c

index 294babe1816e4d0c2b2343fe22d89af72afcd6cd..a1c4a9c31f9241e9ca679533323e33c0b972e678 100644 (file)
@@ -247,7 +247,6 @@ struct qcom_pcie_ops {
        int (*get_resources)(struct qcom_pcie *pcie);
        int (*init)(struct qcom_pcie *pcie);
        int (*post_init)(struct qcom_pcie *pcie);
-       void (*host_post_init)(struct qcom_pcie *pcie);
        void (*deinit)(struct qcom_pcie *pcie);
        void (*ltssm_enable)(struct qcom_pcie *pcie);
        int (*config_sid)(struct qcom_pcie *pcie);
@@ -1040,25 +1039,6 @@ static int qcom_pcie_post_init_2_7_0(struct qcom_pcie *pcie)
        return 0;
 }
 
-static int qcom_pcie_enable_aspm(struct pci_dev *pdev, void *userdata)
-{
-       /*
-        * Downstream devices need to be in D0 state before enabling PCI PM
-        * substates.
-        */
-       pci_set_power_state_locked(pdev, PCI_D0);
-       pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL);
-
-       return 0;
-}
-
-static void qcom_pcie_host_post_init_2_7_0(struct qcom_pcie *pcie)
-{
-       struct dw_pcie_rp *pp = &pcie->pci->pp;
-
-       pci_walk_bus(pp->bridge->bus, qcom_pcie_enable_aspm, NULL);
-}
-
 static void qcom_pcie_deinit_2_7_0(struct qcom_pcie *pcie)
 {
        struct qcom_pcie_resources_2_7_0 *res = &pcie->res.v2_7_0;
@@ -1358,19 +1338,9 @@ static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp)
        pcie->cfg->ops->deinit(pcie);
 }
 
-static void qcom_pcie_host_post_init(struct dw_pcie_rp *pp)
-{
-       struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
-       struct qcom_pcie *pcie = to_qcom_pcie(pci);
-
-       if (pcie->cfg->ops->host_post_init)
-               pcie->cfg->ops->host_post_init(pcie);
-}
-
 static const struct dw_pcie_host_ops qcom_pcie_dw_ops = {
        .init           = qcom_pcie_host_init,
        .deinit         = qcom_pcie_host_deinit,
-       .post_init      = qcom_pcie_host_post_init,
 };
 
 /* Qcom IP rev.: 2.1.0 Synopsys IP rev.: 4.01a */
@@ -1432,7 +1402,6 @@ static const struct qcom_pcie_ops ops_1_9_0 = {
        .get_resources = qcom_pcie_get_resources_2_7_0,
        .init = qcom_pcie_init_2_7_0,
        .post_init = qcom_pcie_post_init_2_7_0,
-       .host_post_init = qcom_pcie_host_post_init_2_7_0,
        .deinit = qcom_pcie_deinit_2_7_0,
        .ltssm_enable = qcom_pcie_2_3_2_ltssm_enable,
        .config_sid = qcom_pcie_config_sid_1_9_0,
@@ -1443,7 +1412,6 @@ static const struct qcom_pcie_ops ops_1_21_0 = {
        .get_resources = qcom_pcie_get_resources_2_7_0,
        .init = qcom_pcie_init_2_7_0,
        .post_init = qcom_pcie_post_init_2_7_0,
-       .host_post_init = qcom_pcie_host_post_init_2_7_0,
        .deinit = qcom_pcie_deinit_2_7_0,
        .ltssm_enable = qcom_pcie_2_3_2_ltssm_enable,
 };