diff options
| author | Felipe Balbi <balbi@ti.com> | 2015-02-26 15:43:57 -0500 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2015-03-10 16:33:30 -0400 |
| commit | 34754dec8ab83799a0a37f2a7ada8ce1e53d174b (patch) | |
| tree | 9f3a42853dd0ffe54043ccfdc8b3cb5085849651 | |
| parent | 0244336f812583299291e18b69a75be5674e819f (diff) | |
usb: musb: core: always try to recover from babble
we can also have babble conditions with LS/FS
and we also want to recover in that case.
Because of that we will drop the check of HSMODE
and always try to run babble recovery.
Suggested-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
| -rw-r--r-- | drivers/usb/musb/musb_core.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3916e73abf7d..a48b5a9c6c47 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
| @@ -863,28 +863,18 @@ b_host: | |||
| 863 | if (int_usb & MUSB_INTR_RESET) { | 863 | if (int_usb & MUSB_INTR_RESET) { |
| 864 | handled = IRQ_HANDLED; | 864 | handled = IRQ_HANDLED; |
| 865 | if (devctl & MUSB_DEVCTL_HM) { | 865 | if (devctl & MUSB_DEVCTL_HM) { |
| 866 | u8 power = musb_readl(musb->mregs, MUSB_POWER); | ||
| 867 | |||
| 868 | /* | 866 | /* |
| 869 | * Looks like non-HS BABBLE can be ignored, but | 867 | * When BABBLE happens what we can depends on which |
| 870 | * HS BABBLE is an error condition. | ||
| 871 | * | ||
| 872 | * For HS the solution is to avoid babble in the first | ||
| 873 | * place and fix what caused BABBLE. | ||
| 874 | * | ||
| 875 | * When HS BABBLE happens what we can depends on which | ||
| 876 | * platform MUSB is running, because some platforms | 868 | * platform MUSB is running, because some platforms |
| 877 | * implemented proprietary means for 'recovering' from | 869 | * implemented proprietary means for 'recovering' from |
| 878 | * Babble conditions. One such platform is AM335x. In | 870 | * Babble conditions. One such platform is AM335x. In |
| 879 | * most cases, however, the only thing we can do is drop | 871 | * most cases, however, the only thing we can do is |
| 880 | * the session. | 872 | * drop the session. |
| 881 | */ | 873 | */ |
| 882 | if (power & MUSB_POWER_HSMODE) { | 874 | dev_err(musb->controller, "Babble\n"); |
| 883 | dev_err(musb->controller, "Babble\n"); | ||
| 884 | 875 | ||
| 885 | if (is_host_active(musb)) | 876 | if (is_host_active(musb)) |
| 886 | musb_recover_from_babble(musb); | 877 | musb_recover_from_babble(musb); |
| 887 | } | ||
| 888 | } else { | 878 | } else { |
| 889 | dev_dbg(musb->controller, "BUS RESET as %s\n", | 879 | dev_dbg(musb->controller, "BUS RESET as %s\n", |
| 890 | usb_otg_state_string(musb->xceiv->otg->state)); | 880 | usb_otg_state_string(musb->xceiv->otg->state)); |
