diff options
author | supriya karanth <supriya.karanth@stericsson.com> | 2011-12-09 16:32:37 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-01-10 09:50:25 +0100 |
commit | 330f78a83c1f47055427e10a68733af77b2cbac8 (patch) | |
tree | c491e0d0cd07f25a04c326ad6ef0ae6a476adaf3 /drivers | |
parent | d1c951bf6d73d7daaf74bb8e0f83e02531b0f7f6 (diff) |
usb: musb: TXMAXP,TXCSR setting in Host modestable-linux-ux500-3.1
The TXMAXP and TXCSR registers were not set correctly for
the BULK OUT endpoints causing issues in Full speed in
Host mode.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 367049
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: If5f3552235d8909adef4777f08d612df432d8709
Signed-off-by: supriya karanth <supriya.karanth@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/musb/musb_host.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index f12b046b0d6..241f6342dc2 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -640,7 +640,17 @@ static bool musb_tx_dma_program(struct dma_controller *dma, mode = 1; csr |= MUSB_TXCSR_DMAMODE | MUSB_TXCSR_DMAENAB; /* autoset shouldn't be set in high bandwidth */ - if (qh->hb_mult == 1) + /* + * Enable Autoset according to table + * below + * bulk_split hb_mult Autoset_Enable + * 0 1 Yes(Normal) + * 0 >1 No(High BW ISO) + * 1 1 Yes(HS bulk) + * 1 >1 Yes(FS bulk) + */ + if (qh->hb_mult == 1 || (qh->hb_mult > 1 && + can_bulk_split(hw_ep->musb, qh->type))) csr |= MUSB_TXCSR_AUTOSET; } else { mode = 0; @@ -787,6 +797,13 @@ static void musb_ep_program(struct musb *musb, u8 epnum, /* protocol/endpoint/interval/NAKlimit */ if (epnum) { musb_writeb(epio, MUSB_TXTYPE, qh->type_reg); + /* + * Set the TXMAXP register correctly for Bulk OUT + * endpoints in host mode + */ + if (can_bulk_split(musb, qh->type)) + qh->hb_mult = hw_ep->max_packet_sz_tx + / packet_sz; if (musb->double_buffer_not_ok) musb_writew(epio, MUSB_TXMAXP, hw_ep->max_packet_sz_tx); |