linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Pavan Kondeti <pkondeti@codeaurora.org>
To: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/usb: fix issue of CPU halt when missing USB PHY clock
Date: Wed, 01 Feb 2012 15:41:27 +0530	[thread overview]
Message-ID: <4F290FCF.1040406@codeaurora.org> (raw)
In-Reply-To: <1328088017-9262-1-git-send-email-Shengzhou.Liu@freescale.com>

On 2/1/2012 2:50 PM, Shengzhou Liu wrote:
> diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
> index b556a72..834237e 100644
> --- a/drivers/usb/host/ehci-fsl.c
> +++ b/drivers/usb/host/ehci-fsl.c
> @@ -239,7 +239,7 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci,
>  	ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);
>  }
>  
> -static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)
> +static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)
>  {
>  	struct usb_hcd *hcd = ehci_to_hcd(ehci);
>  	struct fsl_usb2_platform_data *pdata;
> @@ -299,12 +299,19 @@ static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)
>  #endif
>  		out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001);
>  	}
> +
> +	if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) {
> +		printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");
> +		return -1;

Please return a proper error code. -ENODEV ?

> +	}
> +	return 0;
>  }
>  


-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2012-02-01 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01  9:20 [PATCH] powerpc/usb: fix issue of CPU halt when missing USB PHY clock Shengzhou Liu
2012-02-01 10:11 ` Pavan Kondeti [this message]
2012-02-02  3:31   ` Liu Shengzhou-B36685
2012-02-15  2:31     ` Benjamin Herrenschmidt
2012-02-16 10:16       ` Liu Shengzhou-B36685

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=4F290FCF.1040406@codeaurora.org \
    --to=pkondeti@codeaurora.org \
    --cc=Shengzhou.Liu@freescale.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).