mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Johan Hovold <johan+linaro@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 08/20] phy: qcom-qmp-combo: clean up status polling
Date: Thu, 13 Oct 2022 00:14:17 +0300	[thread overview]
Message-ID: <ca4eef6a-dedd-1823-9525-67d695ac3e58@linaro.org> (raw)
In-Reply-To: <20221012085002.24099-8-johan+linaro@kernel.org>

On 12/10/2022 11:49, Johan Hovold wrote:
> Clean up the PHY status polling by dropping the configuration mask which
> is no longer needed since the QMP driver split.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

This comes in expectation that 4.20 / 5.20 PHYs will be limited to PCIe. 
I'd add this to the commit message. With that fixed:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 14 ++------------
>   1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 82055d3a3536..e312cad6d9c2 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -853,8 +853,6 @@ struct qmp_phy_cfg {
>   
>   	unsigned int start_ctrl;
>   	unsigned int pwrdn_ctrl;
> -	/* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
> -	unsigned int phy_status;
>   
>   	/* true, if PHY needs delay after POWER_DOWN */
>   	bool has_pwrdn_delay;
> @@ -1023,7 +1021,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
> -	.phy_status		= PHYSTATUS,
>   
>   	.has_pwrdn_delay	= true,
>   };
> @@ -1092,7 +1089,6 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
>   
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
> -	.phy_status		= PHYSTATUS,
>   
>   	.has_pwrdn_delay	= true,
>   };
> @@ -1127,7 +1123,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
> -	.phy_status		= PHYSTATUS,
>   
>   	.has_pwrdn_delay	= true,
>   };
> @@ -1197,7 +1192,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
>   
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
> -	.phy_status		= PHYSTATUS,
>   };
>   
>   static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
> @@ -1267,7 +1261,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
> -	.phy_status		= PHYSTATUS,
>   
>   	.has_pwrdn_delay	= true,
>   };
> @@ -2017,7 +2010,7 @@ static int qmp_combo_power_on(struct phy *phy)
>   	void __iomem *rx = qphy->rx;
>   	void __iomem *pcs = qphy->pcs;
>   	void __iomem *status;
> -	unsigned int mask, val, ready;
> +	unsigned int val;
>   	int ret;
>   
>   	qmp_combo_serdes_init(qphy);
> @@ -2059,10 +2052,7 @@ static int qmp_combo_power_on(struct phy *phy)
>   		qphy_setbits(pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl);
>   
>   		status = pcs + cfg->regs[QPHY_PCS_STATUS];
> -		mask = cfg->phy_status;
> -		ready = 0;
> -
> -		ret = readl_poll_timeout(status, val, (val & mask) == ready, 10,
> +		ret = readl_poll_timeout(status, val, !(val & PHYSTATUS), 10,
>   					 PHY_INIT_COMPLETE_TIMEOUT);
>   		if (ret) {
>   			dev_err(qmp->dev, "phy initialization timed-out\n");

-- 
With best wishes
Dmitry


  reply	other threads:[~2022-10-12 21:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  8:48 [PATCH 00/20] phy: qcom-qmp: further prep fixes and cleanups (set 3) Johan Hovold
2022-10-12  8:49 ` [PATCH 01/20] phy: qcom-qmp-pcie: fix sc8180x initialisation Johan Hovold
2022-10-12  8:49   ` [PATCH 02/20] phy: qcom-qmp-pcie: fix ipq8074-gen3 initialisation Johan Hovold
2022-10-12 20:44     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 03/20] phy: qcom-qmp-pcie: fix ipq6018 initialisation Johan Hovold
2022-10-12 20:44     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 04/20] phy: qcom-qmp-pcie: clean up status polling Johan Hovold
2022-10-12 20:45     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 05/20] phy: qcom-qmp-pcie: increase status polling period Johan Hovold
2022-10-12  8:49   ` [PATCH 06/20] phy: qcom-qmp-pcie-msm8996: clean up ready and status polling Johan Hovold
2022-10-12 20:47     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 07/20] phy: qcom-qmp-pcie-msm8996: increase status polling period Johan Hovold
2022-10-12  8:49   ` [PATCH 08/20] phy: qcom-qmp-combo: clean up status polling Johan Hovold
2022-10-12 21:14     ` Dmitry Baryshkov [this message]
2022-10-17  6:55       ` Johan Hovold
2022-10-12  8:49   ` [PATCH 09/20] phy: qcom-qmp-combo: increase status polling period Johan Hovold
2022-10-12  8:49   ` [PATCH 10/20] phy: qcom-qmp-ufs: drop unused phy-status config Johan Hovold
2022-10-12 21:14     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 11/20] phy: qcom-qmp-ufs: clean up ready polling Johan Hovold
2022-10-12 21:14     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 12/20] phy: qcom-qmp-ufs: increase ready polling period Johan Hovold
2022-10-12  8:49   ` [PATCH 13/20] phy: qcom-qmp-usb: clean up status polling Johan Hovold
2022-10-12 21:15     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 14/20] phy: qcom-qmp-usb: increase status polling period Johan Hovold
2022-10-12  8:49   ` [PATCH 15/20] phy: qcom-qmp-combo: drop start and pwrdn-ctrl abstraction Johan Hovold
2022-10-12 21:16     ` Dmitry Baryshkov
2022-10-12  8:49   ` [PATCH 16/20] phy: qcom-qmp-pcie: drop start-ctrl abstraction Johan Hovold
2022-10-12 21:20     ` Dmitry Baryshkov
2022-10-28 12:23       ` Vinod Koul
2022-10-12  8:49   ` [PATCH 17/20] phy: qcom-qmp-pcie: add config sanity checks Johan Hovold
2022-10-12 21:20     ` Dmitry Baryshkov
2022-10-12  8:50   ` [PATCH 18/20] phy: qcom-qmp-pcie-msm8996: drop start and pwrdn-ctrl abstraction Johan Hovold
2022-10-12 21:20     ` Dmitry Baryshkov
2022-10-12  8:50   ` [PATCH 19/20] phy: qcom-qmp-ufs: " Johan Hovold
2022-10-12 21:20     ` Dmitry Baryshkov
2022-10-12  8:50   ` [PATCH 20/20] phy: qcom-qmp-usb: " Johan Hovold
2022-10-12 21:21     ` Dmitry Baryshkov
2022-10-12 20:44   ` [PATCH 01/20] phy: qcom-qmp-pcie: fix sc8180x initialisation Dmitry Baryshkov
2022-10-12 12:36 ` [PATCH 00/20] phy: qcom-qmp: further prep fixes and cleanups (set 3) Johan Hovold
2022-10-28 12:25 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca4eef6a-dedd-1823-9525-67d695ac3e58@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=johan+linaro@kernel.org \
    --cc=kishon@ti.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®