1 Enables support for camera (as creative) requiring high bandwidth
4 Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
6 drivers/usb/musb/musb_core.c | 18 +++++++++---------
7 drivers/usb/musb/musb_host.c | 32 +++++++++++++++++++++-----------
8 2 files changed, 30 insertions(+), 20 deletions(-)
10 diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
11 index c939f81..9914f70 100644
12 --- a/drivers/usb/musb/musb_core.c
13 +++ b/drivers/usb/musb/musb_core.c
14 @@ -1063,17 +1063,17 @@ static struct fifo_cfg __initdata mode_4_cfg[] = {
15 { .hw_ep_num = 7, .style = FIFO_TX, .maxpacket = 512, },
16 { .hw_ep_num = 7, .style = FIFO_RX, .maxpacket = 512, },
17 { .hw_ep_num = 8, .style = FIFO_TX, .maxpacket = 512, },
18 -{ .hw_ep_num = 8, .style = FIFO_RX, .maxpacket = 512, },
19 +{ .hw_ep_num = 8, .style = FIFO_RX, .maxpacket = 64, },
20 { .hw_ep_num = 9, .style = FIFO_TX, .maxpacket = 512, },
21 -{ .hw_ep_num = 9, .style = FIFO_RX, .maxpacket = 512, },
22 +{ .hw_ep_num = 9, .style = FIFO_RX, .maxpacket = 64, },
23 { .hw_ep_num = 10, .style = FIFO_TX, .maxpacket = 512, },
24 -{ .hw_ep_num = 10, .style = FIFO_RX, .maxpacket = 512, },
25 -{ .hw_ep_num = 11, .style = FIFO_TX, .maxpacket = 512, },
26 -{ .hw_ep_num = 11, .style = FIFO_RX, .maxpacket = 512, },
27 -{ .hw_ep_num = 12, .style = FIFO_TX, .maxpacket = 512, },
28 -{ .hw_ep_num = 12, .style = FIFO_RX, .maxpacket = 512, },
29 -{ .hw_ep_num = 13, .style = FIFO_TX, .maxpacket = 512, },
30 -{ .hw_ep_num = 13, .style = FIFO_RX, .maxpacket = 512, },
31 +{ .hw_ep_num = 10, .style = FIFO_RX, .maxpacket = 64, },
32 +{ .hw_ep_num = 11, .style = FIFO_TX, .maxpacket = 256, },
33 +{ .hw_ep_num = 11, .style = FIFO_RX, .maxpacket = 256, },
34 +{ .hw_ep_num = 12, .style = FIFO_TX, .maxpacket = 256, },
35 +{ .hw_ep_num = 12, .style = FIFO_RX, .maxpacket = 256, },
36 +{ .hw_ep_num = 13, .style = FIFO_TX, .maxpacket = 256, },
37 +{ .hw_ep_num = 13, .style = FIFO_RX, .maxpacket = 4096, },
38 { .hw_ep_num = 14, .style = FIFO_RXTX, .maxpacket = 1024, },
39 { .hw_ep_num = 15, .style = FIFO_RXTX, .maxpacket = 1024, },
41 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
42 index 08e421f..84173df 100644
43 --- a/drivers/usb/musb/musb_host.c
44 +++ b/drivers/usb/musb/musb_host.c
45 @@ -1443,6 +1443,10 @@ void musb_host_rx(struct musb *musb, u8 epnum)
46 /* packet error reported later */
49 + } else if (rx_csr & MUSB_RXCSR_INCOMPRX) {
50 + DBG(3, "end %d Highbandwidth incomplete ISO packet received\n"
55 /* faults abort the transfer */
56 @@ -1595,7 +1599,13 @@ void musb_host_rx(struct musb *musb, u8 epnum)
57 val &= ~MUSB_RXCSR_H_AUTOREQ;
59 val |= MUSB_RXCSR_H_AUTOREQ;
60 - val |= MUSB_RXCSR_AUTOCLEAR | MUSB_RXCSR_DMAENAB;
62 + if (qh->maxpacket & ~0x7ff)
63 + /* Autoclear doesn't work in high bandwidth iso */
64 + val |= MUSB_RXCSR_DMAENAB;
66 + val |= MUSB_RXCSR_AUTOCLEAR
67 + | MUSB_RXCSR_DMAENAB;
69 musb_writew(epio, MUSB_RXCSR,
70 MUSB_RXCSR_H_WZC_BITS | val);
71 @@ -1666,6 +1676,7 @@ static int musb_schedule(
73 struct musb_hw_ep *hw_ep = NULL;
74 struct list_head *head = NULL;
77 /* use fixed hardware for control and bulk */
79 @@ -1708,6 +1719,13 @@ static int musb_schedule(
83 + if (qh->maxpacket & (1<<11))
84 + maxpacket = 2 * (qh->maxpacket & 0x7ff);
85 + else if (qh->maxpacket & (1<<12))
86 + maxpacket = 3 * (qh->maxpacket & 0x7ff);
88 + maxpacket = (qh->maxpacket & 0x7ff);
90 for (epnum = 1; epnum < musb->nr_endpoints; epnum++) {
93 @@ -1718,9 +1736,9 @@ static int musb_schedule(
97 - diff = hw_ep->max_packet_sz_rx - qh->maxpacket;
98 + diff = hw_ep->max_packet_sz_rx - maxpacket;
100 - diff = hw_ep->max_packet_sz_tx - qh->maxpacket;
101 + diff = hw_ep->max_packet_sz_tx - maxpacket;
103 if (diff > 0 && best_diff > diff) {
105 @@ -1797,13 +1815,6 @@ static int musb_urb_enqueue(
108 qh->maxpacket = le16_to_cpu(epd->wMaxPacketSize);
110 - /* no high bandwidth support yet */
111 - if (qh->maxpacket & ~0x7ff) {
116 qh->epnum = epd->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
117 qh->type = epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
119 @@ -1897,7 +1908,6 @@ static int musb_urb_enqueue(
121 spin_unlock_irqrestore(&musb->lock, flags);
125 usb_hcd_unlink_urb_from_ep(hcd, urb);
131 To unsubscribe from this list: send the line "unsubscribe linux-omap" in
132 the body of a message to majordomo@vger.kernel.org
133 More majordomo info at http://vger.kernel.org/majordomo-info.html