diff options
| author | Shengzhou Liu <Shengzhou.Liu@freescale.com> | 2012-02-16 05:02:20 -0500 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2012-04-05 11:17:17 -0400 |
| commit | d66d3962617d6589d278cb99c7418025c35cc91b (patch) | |
| tree | 78a5db7221a81c0e6504e231bccc5a665dfb4cd9 /drivers/usb/host | |
| parent | 7e6a9751e6a1cd16691a752078b2a2d1c99ecbab (diff) | |
powerpc/usb: fix bug of kernel hang when initializing usb
BugLink: http://bugs.launchpad.net/bugs/971808
commit 28c56ea1431421dec51b7b229369e991481453df upstream.
If USB UTMI PHY is not enable, writing to portsc register will lead to
kernel hang during boot up.
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ehci-fsl.c | 4 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-fsl.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index bc7f166395a..fc93d57609a 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
| @@ -216,6 +216,8 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci, | |||
| 216 | unsigned int port_offset) | 216 | unsigned int port_offset) |
| 217 | { | 217 | { |
| 218 | u32 portsc; | 218 | u32 portsc; |
| 219 | struct usb_hcd *hcd = ehci_to_hcd(ehci); | ||
| 220 | void __iomem *non_ehci = hcd->regs; | ||
| 219 | 221 | ||
| 220 | portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); | 222 | portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); |
| 221 | portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW); | 223 | portsc &= ~(PORT_PTS_MSK | PORT_PTS_PTW); |
| @@ -231,6 +233,8 @@ static void ehci_fsl_setup_phy(struct ehci_hcd *ehci, | |||
| 231 | portsc |= PORT_PTS_PTW; | 233 | portsc |= PORT_PTS_PTW; |
| 232 | /* fall through */ | 234 | /* fall through */ |
| 233 | case FSL_USB2_PHY_UTMI: | 235 | case FSL_USB2_PHY_UTMI: |
| 236 | /* enable UTMI PHY */ | ||
| 237 | setbits32(non_ehci + FSL_SOC_USB_CTRL, CTRL_UTMI_PHY_EN); | ||
| 234 | portsc |= PORT_PTS_UTMI; | 238 | portsc |= PORT_PTS_UTMI; |
| 235 | break; | 239 | break; |
| 236 | case FSL_USB2_PHY_NONE: | 240 | case FSL_USB2_PHY_NONE: |
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h index 49180622116..bea5013ab7f 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h | |||
| @@ -45,5 +45,6 @@ | |||
| 45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ | 45 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ |
| 46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ | 46 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ |
| 47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ | 47 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ |
| 48 | #define CTRL_UTMI_PHY_EN (1<<9) | ||
| 48 | #define SNOOP_SIZE_2GB 0x1e | 49 | #define SNOOP_SIZE_2GB 0x1e |
| 49 | #endif /* _EHCI_FSL_H */ | 50 | #endif /* _EHCI_FSL_H */ |
