* [PATCH] PCI: qcom: Drop unused post-init callbacks
@ 2022-06-20 15:07 Johan Hovold
2022-06-20 15:29 ` Dmitry Baryshkov
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hovold @ 2022-06-20 15:07 UTC (permalink / raw)
To: Bjorn Helgaas, Lorenzo Pieralisi
Cc: Andy Gross, Bjorn Andersson, Stanimir Varbanov, Rob Herring,
Krzysztof Wilczyński, linux-arm-msm, linux-pci,
linux-kernel, Johan Hovold
Drop the unused post_init and post_deinit callbacks that were added for
the now removed pipe clock handling.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
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/20220519094646.23009-1-johan+linaro@kernel.org/
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(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index ff1b40f213c1..fe701da32119 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: qcom: Drop unused post-init callbacks
2022-06-20 15:07 [PATCH] PCI: qcom: Drop unused post-init callbacks Johan Hovold
@ 2022-06-20 15:29 ` Dmitry Baryshkov
2022-06-20 15:42 ` Johan Hovold
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2022-06-20 15:29 UTC (permalink / raw)
To: Johan Hovold
Cc: Bjorn Helgaas, Lorenzo Pieralisi, Andy Gross, Bjorn Andersson,
Stanimir Varbanov, Rob Herring, Krzysztof Wilczyński,
linux-arm-msm, linux-pci, linux-kernel
On Mon, 20 Jun 2022 at 18:19, Johan Hovold <johan+linaro@kernel.org> wrote:
>
> Drop the unused post_init and post_deinit callbacks 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.
[1] https://lore.kernel.org/linux-arm-msm/a470b27a642d21e7b3e64d0f3287c0c3521bd182.1655028401.git.baruch@tkos.co.il/
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>
> 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/20220519094646.23009-1-johan+linaro@kernel.org/
>
> 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(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index ff1b40f213c1..fe701da32119 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -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
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PCI: qcom: Drop unused post-init callbacks
2022-06-20 15:29 ` Dmitry Baryshkov
@ 2022-06-20 15:42 ` Johan Hovold
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2022-06-20 15:42 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Johan Hovold, Bjorn Helgaas, Lorenzo Pieralisi, Andy Gross,
Bjorn Andersson, Stanimir Varbanov, Rob Herring,
Krzysztof Wilczyński, linux-arm-msm, linux-pci,
linux-kernel
On Mon, Jun 20, 2022 at 06:29:17PM +0300, Dmitry Baryshkov wrote:
> On Mon, 20 Jun 2022 at 18:19, Johan Hovold <johan+linaro@kernel.org> wrote:
> >
> > Drop the unused post_init and post_deinit callbacks 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.
>
> [1] https://lore.kernel.org/linux-arm-msm/a470b27a642d21e7b3e64d0f3287c0c3521bd182.1655028401.git.baruch@tkos.co.il/
Ah, ok. Let's keep them then.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-20 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 15:07 [PATCH] PCI: qcom: Drop unused post-init callbacks Johan Hovold
2022-06-20 15:29 ` Dmitry Baryshkov
2022-06-20 15:42 ` Johan Hovold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.