Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354590
b: refs/heads/master
c: f278628
h: refs/heads/master
v: v3
  • Loading branch information
supriya karanth authored and Felipe Balbi committed Jan 10, 2013
1 parent b738de7 commit 2d3237b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb3a2ef2eb8cfaea335dcb3426350df7f3d48069
refs/heads/master: f27862819350d2c1a679b690b5b3559e632e81eb
24 changes: 18 additions & 6 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,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;
Expand Down Expand Up @@ -791,17 +801,19 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
/* protocol/endpoint/interval/NAKlimit */
if (epnum) {
musb_writeb(epio, MUSB_TXTYPE, qh->type_reg);
if (musb->double_buffer_not_ok)
if (musb->double_buffer_not_ok) {
musb_writew(epio, MUSB_TXMAXP,
hw_ep->max_packet_sz_tx);
else if (can_bulk_split(musb, qh->type))
} else if (can_bulk_split(musb, qh->type)) {
qh->hb_mult = hw_ep->max_packet_sz_tx
/ packet_sz;
musb_writew(epio, MUSB_TXMAXP, packet_sz
| ((hw_ep->max_packet_sz_tx /
packet_sz) - 1) << 11);
else
| ((qh->hb_mult) - 1) << 11);
} else {
musb_writew(epio, MUSB_TXMAXP,
qh->maxpacket |
((qh->hb_mult - 1) << 11));
}
musb_writeb(epio, MUSB_TXINTERVAL, qh->intv_reg);
} else {
musb_writeb(epio, MUSB_NAKLIMIT0, qh->intv_reg);
Expand Down

0 comments on commit 2d3237b

Please sign in to comment.