summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2015-02-26 10:54:27 -0600
committerFelipe Balbi <balbi@ti.com>2015-03-10 15:33:25 -0500
commit28378d5ed5ca1221479d2f94c3b346691834822f (patch)
treea576c5936a91ba134a3158b060e6ed9c81ff6a34 /drivers/usb/musb
parentd57a27711939dcb289b3d17ac48fca99f0fd245d (diff)
usb: musb: core: fix highspeed check
FSDEV is set for both HIGH and FULL speeds, the correct HIGHSPEED check is done through power register's HSMODE bit. Tested-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 21ab26636631..cf7b10e5963e 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -880,16 +880,23 @@ b_host:
if (int_usb & MUSB_INTR_RESET) {
handled = IRQ_HANDLED;
if (devctl & MUSB_DEVCTL_HM) {
+ u8 power = musb_readl(musb->mregs, MUSB_POWER);
+
/*
* Looks like non-HS BABBLE can be ignored, but
- * HS BABBLE is an error condition. For HS the solution
- * is to avoid babble in the first place and fix what
- * caused BABBLE. When HS BABBLE happens we can only
- * stop the session.
+ * HS BABBLE is an error condition.
+ *
+ * For HS the solution is to avoid babble in the first
+ * place and fix what caused BABBLE.
+ *
+ * When HS BABBLE happens what we can depends on which
+ * platform MUSB is running, because some platforms
+ * implemented proprietary means for 'recovering' from
+ * Babble conditions. One such platform is AM335x. In
+ * most cases, however, the only thing we can do is drop
+ * the session.
*/
- if (devctl & (MUSB_DEVCTL_FSDEV | MUSB_DEVCTL_LSDEV)) {
- dev_dbg(musb->controller, "BABBLE devctl: %02x\n", devctl);
- } else {
+ if (power & MUSB_POWER_HSMODE) {
ERR("Stopping host session -- babble\n");
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
}