Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287385
b: refs/heads/master
c: 529febe
h: refs/heads/master
i:
  287383: d89a53f
v: v3
  • Loading branch information
Shengzhou Liu authored and Greg Kroah-Hartman committed Feb 2, 2012
1 parent ce95fbb commit 0e3ea7d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed2833ac7ee86ee00f6dd3085a32752209fd8b6e
refs/heads/master: 529febeee680dc22416fca033151a5e8bc620447
11 changes: 9 additions & 2 deletions trunk/drivers/usb/host/ehci-fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 -ENODEV;
}
return 0;
}

/* called after powerup, by probe or system-pm "wakeup" */
static int ehci_fsl_reinit(struct ehci_hcd *ehci)
{
ehci_fsl_usb_setup(ehci);
if (ehci_fsl_usb_setup(ehci))
return -ENODEV;
ehci_port_power(ehci, 0);

return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/host/ehci-fsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
#define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */
#define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */
#define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */
#define CTRL_PHY_CLK_VALID (1 << 17)
#define SNOOP_SIZE_2GB 0x1e
#endif /* _EHCI_FSL_H */

0 comments on commit 0e3ea7d

Please sign in to comment.