]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: qcom: Drop the assert_perst() callbacks
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Thu, 15 Jan 2026 07:29:05 +0000 (12:59 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Jan 2026 19:23:38 +0000 (13:23 -0600)
Previously, the pcie-qcom driver probed first, deasserted PERST#, enabled
link training and scanned the bus. By the time the pwrctrl driver probe got
called, link training was already enabled by the controller driver.

Thus the pwrctrl drivers had to call the .assert_perst() callback, to
assert PERST#, power on the needed resources, and then call the
.assert_perst() callback to deassert PERST#.

Now since all pwrctrl drivers and this controller driver have been
converted to the new pwrctrl design where the pwrctrl drivers will first
power on the devices before this driver deasserts PERST# and scan the bus.
So there is no longer a need for .assert_perst() callback in this driver
and in DWC core driver. Hence, drop them.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260115-pci-pwrctrl-rework-v5-13-9d26da3ce903@oss.qualcomm.com
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.h
drivers/pci/controller/dwc/pcie-qcom.c

index 372207c33a857b4c98572bb1e9b61fa0080bc871..4862a3a059c7f377ab3c6f450ea2e19df77c0037 100644 (file)
@@ -857,19 +857,10 @@ static void __iomem *dw_pcie_ecam_conf_map_bus(struct pci_bus *bus, unsigned int
        return pci->dbi_base + where;
 }
 
-static int dw_pcie_op_assert_perst(struct pci_bus *bus, bool assert)
-{
-       struct dw_pcie_rp *pp = bus->sysdata;
-       struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
-
-       return dw_pcie_assert_perst(pci, assert);
-}
-
 static struct pci_ops dw_pcie_ops = {
        .map_bus = dw_pcie_own_conf_map_bus,
        .read = pci_generic_config_read,
        .write = pci_generic_config_write,
-       .assert_perst = dw_pcie_op_assert_perst,
 };
 
 static struct pci_ops dw_pcie_ecam_ops = {
index 31685951a080456b8834aab2bf79a36c78f46639..da32bb5f936c866d446191da8f75da3ae5ab6ada 100644 (file)
@@ -493,7 +493,6 @@ struct dw_pcie_ops {
        enum dw_pcie_ltssm (*get_ltssm)(struct dw_pcie *pcie);
        int     (*start_link)(struct dw_pcie *pcie);
        void    (*stop_link)(struct dw_pcie *pcie);
-       int     (*assert_perst)(struct dw_pcie *pcie, bool assert);
 };
 
 struct debugfs_info {
@@ -798,14 +797,6 @@ static inline void dw_pcie_stop_link(struct dw_pcie *pci)
                pci->ops->stop_link(pci);
 }
 
-static inline int dw_pcie_assert_perst(struct dw_pcie *pci, bool assert)
-{
-       if (pci->ops && pci->ops->assert_perst)
-               return pci->ops->assert_perst(pci, assert);
-
-       return 0;
-}
-
 static inline enum dw_pcie_ltssm dw_pcie_get_ltssm(struct dw_pcie *pci)
 {
        u32 val;
index 20b7593b839728e51c64a63af3c8ede250af2608..2a47f71d936aabae6bb4c67cb764db512ee8d76a 100644 (file)
@@ -642,18 +642,6 @@ static int qcom_pcie_post_init_1_0_0(struct qcom_pcie *pcie)
        return 0;
 }
 
-static int qcom_pcie_assert_perst(struct dw_pcie *pci, bool assert)
-{
-       struct qcom_pcie *pcie = to_qcom_pcie(pci);
-
-       if (assert)
-               qcom_ep_reset_assert(pcie);
-       else
-               qcom_ep_reset_deassert(pcie);
-
-       return 0;
-}
-
 static void qcom_pcie_2_3_2_ltssm_enable(struct qcom_pcie *pcie)
 {
        u32 val;
@@ -1514,7 +1502,6 @@ static const struct qcom_pcie_cfg cfg_fw_managed = {
 static const struct dw_pcie_ops dw_pcie_ops = {
        .link_up = qcom_pcie_link_up,
        .start_link = qcom_pcie_start_link,
-       .assert_perst = qcom_pcie_assert_perst,
 };
 
 static int qcom_pcie_icc_init(struct qcom_pcie *pcie)