All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Yinbo Zhu <yinbo.zhu@nxp.com>
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>,
	Jerry Huang <jerry.huang@nxp.com>, Ran Wang <ran.wang_1@nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ramneek Mehresh <ramneek.mehresh@freescale.com>,
	Nikhil Badola <nikhil.badola@freescale.com>,
	Suresh Gupta <suresh.gupta@freescale.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 4/5] usb: host: Stops USB controller init if PLL fails to lock
Date: Mon, 28 Jan 2019 10:38:11 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1901281037380.1450-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20190125060356.14294-4-yinbo.zhu@nxp.com>

On Fri, 25 Jan 2019, Yinbo Zhu wrote:

> From: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> 
> USB erratum-A006918 workaround tries to start internal PHY inside
> uboot (when PLL fails to lock). However, if the workaround also
> fails, then USB initialization is also stopped inside Linux.
> Erratum-A006918 workaround failure creates "fsl,erratum_a006918"
> node in device-tree. Presence of this node in device-tree is
> used to stop USB controller initialization in Linux
> 
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  drivers/usb/host/ehci-fsl.c      |    5 +++++
>  drivers/usb/host/fsl-mph-dr-of.c |    3 ++-
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index 373a816..8b47277 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -236,6 +236,11 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
>  		portsc |= PORT_PTS_PTW;
>  		/* fall through */
>  	case FSL_USB2_PHY_UTMI:
> +		if (pdata->has_fsl_erratum_a006918) {
> +			pr_warn("fsl-ehci: USB PHY clock invalid\n");

Again, you should use dev_warn() instead of pr_warn().

Alan Stern

> +			return -EINVAL;
> +		}
> +
>  	case FSL_USB2_PHY_UTMI_DUAL:
>  		/* PHY_CLK_VALID bit is de-featured from all controller
>  		 * versions below 2.4 and is to be checked only for
> diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
> index 4f8b8a0..762b976 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -224,13 +224,14 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
>  		of_property_read_bool(np, "fsl,usb-erratum-a005275");
>  	pdata->has_fsl_erratum_a005697 =
>  		of_property_read_bool(np, "fsl,usb_erratum-a005697");
> +	pdata->has_fsl_erratum_a006918 =
> +		of_property_read_bool(np, "fsl,usb_erratum-a006918");
>  
>  	if (of_get_property(np, "fsl,usb_erratum_14", NULL))
>  		pdata->has_fsl_erratum_14 = 1;
>  	else
>  		pdata->has_fsl_erratum_14 = 0;
>  
> -
>  	/*
>  	 * Determine whether phy_clk_valid needs to be checked
>  	 * by reading property in device tree
> 


WARNING: multiple messages have this Message-ID (diff)
From: Alan Stern <stern@rowland.harvard.edu>
To: Yinbo Zhu <yinbo.zhu@nxp.com>
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>,
	Jerry Huang <jerry.huang@nxp.com>, Ran Wang <ran.wang_1@nxp.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ramneek Mehresh <ramneek.mehresh@freescale.com>,
	Nikhil Badola <nikhil.badola@freescale.com>,
	Suresh Gupta <suresh.gupta@freescale.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [v4,4/5] usb: host: Stops USB controller init if PLL fails to lock
Date: Mon, 28 Jan 2019 10:38:11 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1901281037380.1450-100000@iolanthe.rowland.org> (raw)

On Fri, 25 Jan 2019, Yinbo Zhu wrote:

> From: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> 
> USB erratum-A006918 workaround tries to start internal PHY inside
> uboot (when PLL fails to lock). However, if the workaround also
> fails, then USB initialization is also stopped inside Linux.
> Erratum-A006918 workaround failure creates "fsl,erratum_a006918"
> node in device-tree. Presence of this node in device-tree is
> used to stop USB controller initialization in Linux
> 
> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  drivers/usb/host/ehci-fsl.c      |    5 +++++
>  drivers/usb/host/fsl-mph-dr-of.c |    3 ++-
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index 373a816..8b47277 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -236,6 +236,11 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
>  		portsc |= PORT_PTS_PTW;
>  		/* fall through */
>  	case FSL_USB2_PHY_UTMI:
> +		if (pdata->has_fsl_erratum_a006918) {
> +			pr_warn("fsl-ehci: USB PHY clock invalid\n");

Again, you should use dev_warn() instead of pr_warn().

Alan Stern

> +			return -EINVAL;
> +		}
> +
>  	case FSL_USB2_PHY_UTMI_DUAL:
>  		/* PHY_CLK_VALID bit is de-featured from all controller
>  		 * versions below 2.4 and is to be checked only for
> diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
> index 4f8b8a0..762b976 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -224,13 +224,14 @@ static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev)
>  		of_property_read_bool(np, "fsl,usb-erratum-a005275");
>  	pdata->has_fsl_erratum_a005697 =
>  		of_property_read_bool(np, "fsl,usb_erratum-a005697");
> +	pdata->has_fsl_erratum_a006918 =
> +		of_property_read_bool(np, "fsl,usb_erratum-a006918");
>  
>  	if (of_get_property(np, "fsl,usb_erratum_14", NULL))
>  		pdata->has_fsl_erratum_14 = 1;
>  	else
>  		pdata->has_fsl_erratum_14 = 0;
>  
> -
>  	/*
>  	 * Determine whether phy_clk_valid needs to be checked
>  	 * by reading property in device tree
>

  reply	other threads:[~2019-01-28 15:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  6:02 [PATCH v4 1/5] usb: fsl: Set USB_EN bit to select ULPI phy Yinbo Zhu
2019-01-25  6:02 ` [v4,1/5] " yinbo.zhu
2019-01-25  6:02 ` [PATCH v4 2/5] usb: phy: Workaround for USB erratum-A005728 Yinbo Zhu
2019-01-25  6:02   ` [v4,2/5] " yinbo.zhu
2019-01-28 15:36   ` [PATCH v4 2/5] " Alan Stern
2019-01-28 15:36     ` [v4,2/5] " Alan Stern
2019-05-08  3:26     ` [PATCH v4 2/5] " Yinbo Zhu
2019-05-08  6:41       ` Greg Kroah-Hartman
2019-01-25  6:03 ` [PATCH v4 3/5] usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918 Yinbo Zhu
2019-01-25  6:03   ` [v4,3/5] " yinbo.zhu
2019-01-25  6:03 ` [PATCH v4 4/5] usb: host: Stops USB controller init if PLL fails to lock Yinbo Zhu
2019-01-25  6:03   ` [v4,4/5] " yinbo.zhu
2019-01-28 15:38   ` Alan Stern [this message]
2019-01-28 15:38     ` Alan Stern
2019-01-25  6:03 ` [PATCH v4 5/5] usb :fsl: Change string format for errata property Yinbo Zhu
2019-01-25  6:03   ` [v4,5/5] " yinbo.zhu
2019-01-28 15:33 ` [PATCH v4 1/5] usb: fsl: Set USB_EN bit to select ULPI phy Alan Stern
2019-01-28 15:33   ` [v4,1/5] " Alan Stern

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=Pine.LNX.4.44L0.1901281037380.1450-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=jerry.huang@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nikhil.badola@freescale.com \
    --cc=ramneek.mehresh@freescale.com \
    --cc=ran.wang_1@nxp.com \
    --cc=suresh.gupta@freescale.com \
    --cc=xiaobo.xie@nxp.com \
    --cc=yinbo.zhu@nxp.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 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.