Skip to content

Commit

Permalink
powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
Browse files Browse the repository at this point in the history
PHY_CLK_VALID bit doesn't work properly with UTMI PHY.
e.g. This bit is always zero on P5040, etc.
There is no need to check this bit for UTMI PHY, just keep
checking for ULPI PHY to prevent system hanging.

This patch should be squashed into previous commit 3735ba8
"powerpc/usb: fix bug of CPU hang when missing USB PHY clock"

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Shengzhou Liu authored and Greg Kroah-Hartman committed Sep 24, 2012
1 parent 54575b0 commit 5ed3387
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/host/ehci-fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd,
break;
}

if ((pdata->controller_ver) && ((phy_mode == FSL_USB2_PHY_ULPI) ||
(phy_mode == FSL_USB2_PHY_UTMI))) {
if (pdata->controller_ver && (phy_mode == FSL_USB2_PHY_ULPI)) {
/* check PHY_CLK_VALID to get phy clk valid */
if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) &
PHY_CLK_VALID, FSL_USB_PHY_CLK_TIMEOUT, 0)) {
Expand Down
2 changes: 1 addition & 1 deletion include/linux/fsl_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define FSL_UTMI_PHY_DLY 10 /*As per P1010RM, delay for UTMI
PHY CLK to become stable - 10ms*/
#define FSL_USB_PHY_CLK_TIMEOUT 1000 /* uSec */
#define FSL_USB_PHY_CLK_TIMEOUT 10000 /* uSec */
#define FSL_USB_VER_OLD 0
#define FSL_USB_VER_1_6 1
#define FSL_USB_VER_2_2 2
Expand Down

0 comments on commit 5ed3387

Please sign in to comment.