mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Jonathan Bakker <xc-racer2@live.ca>,
	<linux-kernel@vger.kernel.org>, <s.nawrocki@samsung.com>,
	<kamil@wypas.org>, <krzk@kernel.org>,
	<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH] phy: samsung: s5pv210-usb2: Add delay after reset
Date: Mon, 27 Apr 2020 18:10:17 +0530	[thread overview]
Message-ID: <979ae7cd-2648-c516-1465-3a1507d5fefb@ti.com> (raw)
In-Reply-To: <BN6PR04MB06605D52502816E500683553A3D10@BN6PR04MB0660.namprd04.prod.outlook.com>

Hi Jonathan,

On 4/25/2020 11:06 PM, Jonathan Bakker wrote:
> The USB phy takes some time to reset, so make sure we give it to it. The
> delay length was taken from the 4x12 phy driver.
> 
> This manifested in issues with the DWC2 driver since commit fe369e1826b3
> ("usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.")
> where the endianness check would read the DWC ID as 0 due to the phy still
> resetting, resulting in the wrong endian mode being chosen.
> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> ---
>  drivers/phy/samsung/phy-s5pv210-usb2.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/phy/samsung/phy-s5pv210-usb2.c b/drivers/phy/samsung/phy-s5pv210-usb2.c
> index 56a5083fe6f9..32be62e49804 100644
> --- a/drivers/phy/samsung/phy-s5pv210-usb2.c
> +++ b/drivers/phy/samsung/phy-s5pv210-usb2.c
> @@ -139,6 +139,10 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on)
>  		udelay(10);
>  		rst &= ~rstbits;
>  		writel(rst, drv->reg_phy + S5PV210_UPHYRST);
> +		/* The following delay is necessary for the reset sequence to be
> +		 * completed
> +		 */
> +		udelay(80);

Please fix the following checkpatch check error.
CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.rst
#151: FILE: drivers/phy/samsung/phy-s5pv210-usb2.c:145:
+               udelay(80);

total: 0 errors, 0 warnings, 1 checks, 10 lines checked

Thanks
Kishon

  reply	other threads:[~2020-04-27 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 17:36 Jonathan Bakker
2020-04-27 12:40 ` Kishon Vijay Abraham I [this message]
2020-04-28 21:50   ` Jonathan Bakker
     [not found]   ` <f8e8aa73-15bb-9bbd-d983-cba12528ba01@live.ca>
2020-05-09  2:37     ` Jonathan Bakker
2020-05-13  2:20 ` Kishon Vijay Abraham I

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=979ae7cd-2648-c516-1465-3a1507d5fefb@ti.com \
    --to=kishon@ti.com \
    --cc=kamil@wypas.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=xc-racer2@live.ca \
    /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®