diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 09:00:42 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 09:00:42 -0800 |
commit | 468234984f7bce270484d833899cd8ed4d61e885 (patch) | |
tree | 9b2cf7806baa94aefe243be1b09e1c6aa328f2ff /drivers/usb/musb/musb_gadget.c | |
parent | 6e2477777c8f1d4807437f7de11447319d426f8c (diff) | |
parent | b37457d80bc3e2a6bb86a6036c572574614a7631 (diff) |
Merge tag 'musb-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes:
usb: musb: patches for v3.9 merge window
Mostly fixes all over which weren't urgent enough for
the late -rc cycle.
There is a Double Buffering fix for Host Mode TX,
a dependency fix for the transceiver driver, some
fixes to the error path and a fix for the use of
omap_musb_maibox.
Other than these fixes, there a removal duplicate
headers from the dsps glue layer and removal of
redundant assignments in omap2430_probe().
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 876787438c2f..be18537c5f14 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -408,7 +408,19 @@ static void txstate(struct musb *musb, struct musb_request *req) csr |= (MUSB_TXCSR_DMAENAB | MUSB_TXCSR_DMAMODE | MUSB_TXCSR_MODE); - if (!musb_ep->hb_mult) + /* + * Enable Autoset according to table + * below + * bulk_split hb_mult Autoset_Enable + * 0 0 Yes(Normal) + * 0 >0 No(High BW ISO) + * 1 0 Yes(HS bulk) + * 1 >0 Yes(FS bulk) + */ + if (!musb_ep->hb_mult || + (musb_ep->hb_mult && + can_bulk_split(musb, + musb_ep->type))) csr |= MUSB_TXCSR_AUTOSET; } csr &= ~MUSB_TXCSR_P_UNDERRUN; @@ -1110,11 +1122,15 @@ static int musb_gadget_enable(struct usb_ep *ep, /* Set TXMAXP with the FIFO size of the endpoint * to disable double buffering mode. */ - if (musb->double_buffer_not_ok) + if (musb->double_buffer_not_ok) { musb_writew(regs, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); - else + } else { + if (can_bulk_split(musb, musb_ep->type)) + musb_ep->hb_mult = (hw_ep->max_packet_sz_tx / + musb_ep->packet_sz) - 1; musb_writew(regs, MUSB_TXMAXP, musb_ep->packet_sz | (musb_ep->hb_mult << 11)); + } csr = MUSB_TXCSR_MODE | MUSB_TXCSR_CLRDATATOG; if (musb_readw(regs, MUSB_TXCSR) |