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 09/13] phy: qcom-qmp-pcie-msm8996: drop power-down delay config
Date: Tue, 11 Oct 2022 16:49:17 +0300	[thread overview]
Message-ID: <fa00a1c7-64b5-4c2c-8775-867c3a4f0a11@linaro.org> (raw)
In-Reply-To: <20221011131416.2478-10-johan+linaro@kernel.org>

On 11/10/2022 16:14, Johan Hovold wrote:
> The power-down delay was included in the first version of the QMP driver
> for MSM8996 as an optional delay after powering on the PHY (using
> POWER_DOWN_CONTROL) and just before starting it. Later changes modified
> this sequence by powering on before initialising the PHY, but the
> optional delay stayed where it was (i.e. before starting the PHY).
> 
> The vendor driver does not use a delay before starting the PHY and this
> is likely not needed on any platform unless there is a corresponding
> delay in the vendor kernel init sequence tables (i.e. in devicetree).
> 
> Let's keep the delay for now, but drop the redundant configuration
> options while increasing the unnecessarily low timer slack somewhat.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

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

Note: the comment from the previous patch applies here too.

> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 15 ++-------------
>   1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index 31ac405d3785..899be7bd4d92 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -41,7 +41,7 @@
>   
>   #define PHY_INIT_COMPLETE_TIMEOUT		10000
>   #define POWER_DOWN_DELAY_US_MIN			10
> -#define POWER_DOWN_DELAY_US_MAX			11
> +#define POWER_DOWN_DELAY_US_MAX			20
>   
>   struct qmp_phy_init_tbl {
>   	unsigned int offset;
> @@ -203,12 +203,6 @@ struct qmp_phy_cfg {
>   	unsigned int mask_com_pcs_ready;
>   	/* 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;
> -	/* power_down delay in usec */
> -	int pwrdn_delay_min;
> -	int pwrdn_delay_max;
>   };
>   
>   /**
> @@ -326,10 +320,6 @@ static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
>   	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
>   	.mask_com_pcs_ready	= PCS_READY,
>   	.phy_status		= PHYSTATUS,
> -
> -	.has_pwrdn_delay	= true,
> -	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
> -	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   };
>   
>   static void qmp_pcie_msm8996_configure_lane(void __iomem *base,
> @@ -523,8 +513,7 @@ static int qmp_pcie_msm8996_power_on(struct phy *phy)
>   	 */
>   	qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, cfg->pwrdn_ctrl);
>   
> -	if (cfg->has_pwrdn_delay)
> -		usleep_range(cfg->pwrdn_delay_min, cfg->pwrdn_delay_max);
> +	usleep_range(POWER_DOWN_DELAY_US_MIN, POWER_DOWN_DELAY_US_MAX);
>   
>   	/* Pull PHY out of reset state */
>   	qphy_clrbits(pcs, cfg->regs[QPHY_SW_RESET], SW_RESET);

-- 
With best wishes
Dmitry


  reply	other threads:[~2022-10-11 13:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 13:14 [PATCH 00/13] phy: qcom-qmp: further prep cleanups Johan Hovold
2022-10-11 13:14 ` [PATCH 01/13] phy: qcom-qmp: drop regulator error message Johan Hovold
2022-10-11 13:52   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 02/13] phy: qcom-qmp: drop superfluous comments Johan Hovold
2022-10-11 13:51   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 03/13] phy: qcom-qmp-combo: drop unused in-layout configuration Johan Hovold
2022-10-11 13:51   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 04/13] phy: qcom-qmp-pcie: drop redundant ipq8074 power on Johan Hovold
2022-10-11 13:51   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 05/13] phy: qcom-qmp-pcie-msm8996: drop unused in-layout configuration Johan Hovold
2022-10-11 13:53   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 06/13] phy: qcom-qmp-ufs: " Johan Hovold
2022-10-11 13:53   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 07/13] phy: qcom-qmp-usb: " Johan Hovold
2022-10-11 13:14 ` [PATCH 08/13] phy: qcom-qmp-pcie: drop power-down delay config Johan Hovold
2022-10-11 13:46   ` Dmitry Baryshkov
2022-10-11 13:53     ` Johan Hovold
2022-10-11 14:04       ` Dmitry Baryshkov
2022-10-11 14:17         ` Johan Hovold
2022-10-11 14:41           ` Dmitry Baryshkov
2022-10-12  6:39             ` Johan Hovold
2022-10-11 13:49   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 09/13] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
2022-10-11 13:49   ` Dmitry Baryshkov [this message]
2022-10-11 13:14 ` [PATCH 10/13] phy: qcom-qmp-combo: drop sc8280xp power-down delay Johan Hovold
2022-10-11 14:07   ` Dmitry Baryshkov
2022-10-11 14:21     ` Johan Hovold
2022-10-11 13:14 ` [PATCH 11/13] phy: qcom-qmp-combo: drop power-down delay config Johan Hovold
2022-10-11 14:05   ` Dmitry Baryshkov
2022-10-11 13:14 ` [PATCH 12/13] phy: qcom-qmp-usb: drop sc8280xp power-down delay Johan Hovold
2022-10-11 13:14 ` [PATCH 13/13] phy: qcom-qmp-usb: drop power-down delay config Johan Hovold
2022-10-11 14:05   ` Dmitry Baryshkov

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=fa00a1c7-64b5-4c2c-8775-867c3a4f0a11@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

Powered by JetHome