From: Vinod Koul <vkoul@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: linux-phy@lists.infradead.org, kishon@kernel.org,
linux-arm-kernel@lists.infradead.org,
lorenzo.bianconi83@gmail.com, nbd@nbd.name, john@phrozen.org,
dd@embedd.com, upstream@airoha.com,
angelogioacchino.delregno@collabora.com
Subject: Re: [PATCH] phy: airoha: adjust initialization delay in airoha_pcie_phy_init()
Date: Sun, 4 Aug 2024 23:01:25 +0530 [thread overview]
Message-ID: <Zq-67ZnlmMLh_Ssz@matsya> (raw)
In-Reply-To: <82e50875deba44e34f49bd92578b4dc24f121b01.1720508349.git.lorenzo@kernel.org>
On 09-07-24, 09:03, Lorenzo Bianconi wrote:
> Align phy-pcie initialization delay to the vendor sdk in
> airoha_pcie_phy_init routine and allow the hw to complete required
> configuration before proceeding
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/phy/phy-airoha-pcie.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/phy/phy-airoha-pcie.c b/drivers/phy/phy-airoha-pcie.c
> index bd3edaa986c8..445bacfdaaf4 100644
> --- a/drivers/phy/phy-airoha-pcie.c
> +++ b/drivers/phy/phy-airoha-pcie.c
> @@ -18,6 +18,9 @@
> #define LEQ_LEN_CTRL_MAX_VAL 7
> #define FREQ_LOCK_MAX_ATTEMPT 10
>
> +/* PCIe-PHY initialization time in ms needed by the hw to complete */
> +#define PHY_HW_INIT_TIME_MS 30
> +
> enum airoha_pcie_port_gen {
> PCIE_PORT_GEN1 = 1,
> PCIE_PORT_GEN2,
> @@ -1180,8 +1183,11 @@ static int airoha_pcie_phy_init(struct phy *phy)
> PCIE_DA_XPON_CDR_PR_PWDB);
> airoha_phy_pma1_set_bits(pcie_phy, REG_PCIE_PMA_SS_DA_XPON_PWDB0,
> PCIE_DA_XPON_CDR_PR_PWDB);
> -
> - usleep_range(100, 200);
> + /*
> + * Wait for the time in ms needed by the hw to complete the PCIe-PHY
> + * initialization
> + */
> + mdelay(PHY_HW_INIT_TIME_MS);
Why not use msleep()...?
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2024-08-04 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 7:03 [PATCH] phy: airoha: adjust initialization delay in airoha_pcie_phy_init() Lorenzo Bianconi
2024-08-04 17:31 ` Vinod Koul [this message]
2024-08-05 17:17 ` Lorenzo Bianconi
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=Zq-67ZnlmMLh_Ssz@matsya \
--to=vkoul@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dd@embedd.com \
--cc=john@phrozen.org \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=lorenzo.bianconi83@gmail.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=upstream@airoha.com \
/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;
as well as URLs for NNTP newsgroup(s).