PCI: qcom: Drop unused post-init callbacks
Subsystems (4)
PATCH 1/1 PCI: qcom: Drop unused post-init callbacks
Drop the unused post_init and post_deinit callbacks that were added for the now removed pipe clock handling.
---
Now that Bjorn has merged the pipe clock series:
https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/log/?h=pci/ctrl/qcom
the post_init and post_deinit callbacks can also be removed.
Note that this one depends on the patch adding support for modular builds:
https://lore.kernel.org/all/[email protected]/
which has been reviewed by Rob and should be ready to be picked up.
Johan
drivers/pci/controller/dwc/pcie-qcom.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)
drivers/pci/controller/dwc/pcie-qcom.c +2 -15
@@ -180,9 +180,7 @@ struct qcom_pcie;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 (*deinit)(struct qcom_pcie *pcie); -void (*post_deinit)(struct qcom_pcie *pcie);void (*ltssm_enable)(struct qcom_pcie *pcie);int (*config_sid)(struct qcom_pcie *pcie); };
@@ -1331,27 +1329,18 @@ static int qcom_pcie_host_init(struct pcie_port *pp)if (ret) goto err_deinit; -if (pcie->cfg->ops->post_init) { - ret = pcie->cfg->ops->post_init (pcie); -if (ret) - goto err_disable_phy; - } -qcom_ep_reset_deassert (pcie);if (pcie->cfg->ops->config_sid) { ret = pcie->cfg->ops->config_sid (pcie);if (ret) - goto err; + goto err_assert_reset; }return 0 ; -err: +err_assert_reset:qcom_ep_reset_assert (pcie); -if (pcie->cfg->ops->post_deinit) - pcie->cfg->ops->post_deinit (pcie); -err_disable_phy:phy_power_off (pcie->phy); err_deinit: pcie->cfg->ops->deinit (pcie);
@@ -1362,8 +1351,6 @@ static int qcom_pcie_host_init(struct pcie_port *pp)static void qcom_pcie_host_deinit (struct qcom_pcie *pcie) {qcom_ep_reset_assert (pcie); -if (pcie->cfg->ops->post_deinit) - pcie->cfg->ops->post_deinit (pcie);phy_power_off (pcie->phy); pcie->cfg->ops->deinit (pcie); }
Signature · 1 line
2.35.1
Quoted 3 lines · Johan Hovold
Drop the unused
post_initandpost_deinitcallbacks that were added for the now removed pipe clock handling.
I think the IPQ60xx PCIe support is intended to use post_init callback. See [1]. That is the reason why I left the post_init in place, while reworking the pipe clocks handling.
Quoted 78 lines
Signed-off-by Johan Hovold <[email protected]>---
Now that Bjorn has merged the pipe clock series:
https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/log/?h=pci/ctrl/qcom
the
post_initandpost_deinitcallbacks can also be removed.Note that this one depends on the patch adding support for modular builds:
https://lore.kernel.org/all/[email protected]/which has been reviewed by Rob and should be ready to be picked up.
Johan
drivers/pci/controller/dwc/pcie-qcom.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-)drivers/pci/controller/dwc/pcie-qcom.c +2
-16@@ -180,9 +180,7 @@ struct qcom_pcie;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 (*deinit)(struct qcom_pcie *pcie); -void (*post_deinit)(struct qcom_pcie *pcie);void (*ltssm_enable)(struct qcom_pcie *pcie);int (*config_sid)(struct qcom_pcie *pcie); };@@ -1331,27 +1329,18 @@ static int qcom_pcie_host_init(struct pcie_port *pp)if (ret) goto err_deinit; -if (pcie->cfg->ops->post_init) { - ret = pcie->cfg->ops->post_init (pcie); -if (ret) - goto err_disable_phy; - } -qcom_ep_reset_deassert (pcie);if (pcie->cfg->ops->config_sid) { ret = pcie->cfg->ops->config_sid (pcie);if (ret) - goto err; + goto err_assert_reset; }return 0 ; -err: +err_assert_reset:qcom_ep_reset_assert (pcie); -if (pcie->cfg->ops->post_deinit) - pcie->cfg->ops->post_deinit (pcie); -err_disable_phy:phy_power_off (pcie->phy); err_deinit: pcie->cfg->ops->deinit (pcie);@@ -1362,8 +1351,6 @@ static int qcom_pcie_host_init(struct pcie_port *pp)static void qcom_pcie_host_deinit (struct qcom_pcie *pcie) {qcom_ep_reset_assert (pcie); -if (pcie->cfg->ops->post_deinit) - pcie->cfg->ops->post_deinit (pcie);phy_power_off (pcie->phy); pcie->cfg->ops->deinit (pcie); } --2.35.1
Signature · 2 lines
With best wishes Dmitry
Quoted 10 lines · Dmitry Baryshkov
Quoted 3 lines · Johan Hovold
Drop the unused
post_initandpost_deinitcallbacks that were added for the now removed pipe clock handling.I think the IPQ60xx PCIe support is intended to use
post_initcallback. See [1]. That is the reason why I left thepost_initin place, while reworking the pipe clocks handling.
Ah, ok. Let's keep them then.
Johan