Lines Matching refs:ep
122 static void use_ep(struct omap_ep *ep, u16 select) in use_ep() argument
124 u16 num = ep->bEndpointAddress & 0x0f; in use_ep()
126 if (ep->bEndpointAddress & USB_DIR_IN) in use_ep()
142 static void dma_channel_claim(struct omap_ep *ep, unsigned preferred);
149 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_enable() local
157 || ep->bEndpointAddress != desc->bEndpointAddress in omap_ep_enable()
158 || ep->maxpacket < usb_endpoint_maxp(desc)) { in omap_ep_enable()
164 && maxp != ep->maxpacket) in omap_ep_enable()
165 || usb_endpoint_maxp(desc) > ep->maxpacket in omap_ep_enable()
187 if (ep->bmAttributes != desc->bmAttributes in omap_ep_enable()
188 && ep->bmAttributes != USB_ENDPOINT_XFER_BULK in omap_ep_enable()
194 udc = ep->udc; in omap_ep_enable()
202 ep->ep.desc = desc; in omap_ep_enable()
203 ep->irqs = 0; in omap_ep_enable()
204 ep->stopped = 0; in omap_ep_enable()
205 ep->ep.maxpacket = maxp; in omap_ep_enable()
208 ep->dma_channel = 0; in omap_ep_enable()
209 ep->has_dma = 0; in omap_ep_enable()
210 ep->lch = -1; in omap_ep_enable()
211 use_ep(ep, UDC_EP_SEL); in omap_ep_enable()
213 ep->ackwait = 0; in omap_ep_enable()
216 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) in omap_ep_enable()
217 list_add(&ep->iso, &udc->iso); in omap_ep_enable()
222 dma_channel_claim(ep, 0); in omap_ep_enable()
226 && !ep->has_dma in omap_ep_enable()
227 && !(ep->bEndpointAddress & USB_DIR_IN)) { in omap_ep_enable()
229 ep->ackwait = 1 + ep->double_buf; in omap_ep_enable()
241 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_disable() local
244 if (!_ep || !ep->ep.desc) { in omap_ep_disable()
246 _ep ? ep->ep.name : NULL); in omap_ep_disable()
250 spin_lock_irqsave(&ep->udc->lock, flags); in omap_ep_disable()
251 ep->ep.desc = NULL; in omap_ep_disable()
252 nuke(ep, -ESHUTDOWN); in omap_ep_disable()
253 ep->ep.maxpacket = ep->maxpacket; in omap_ep_disable()
254 ep->has_dma = 0; in omap_ep_disable()
256 list_del_init(&ep->iso); in omap_ep_disable()
257 del_timer(&ep->timer); in omap_ep_disable()
259 spin_unlock_irqrestore(&ep->udc->lock, flags); in omap_ep_disable()
268 omap_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) in omap_alloc_request() argument
282 omap_free_request(struct usb_ep *ep, struct usb_request *_req) in omap_free_request() argument
292 done(struct omap_ep *ep, struct omap_req *req, int status) in done() argument
294 struct omap_udc *udc = ep->udc; in done()
295 unsigned stopped = ep->stopped; in done()
304 if (use_dma && ep->has_dma) in done()
306 (ep->bEndpointAddress & USB_DIR_IN)); in done()
312 ep->ep.name, &req->req, status, in done()
316 ep->stopped = 1; in done()
317 spin_unlock(&ep->udc->lock); in done()
318 usb_gadget_giveback_request(&ep->ep, &req->req); in done()
319 spin_lock(&ep->udc->lock); in done()
320 ep->stopped = stopped; in done()
358 static int write_fifo(struct omap_ep *ep, struct omap_req *req) in write_fifo() argument
373 count = ep->ep.maxpacket; in write_fifo()
376 ep->ackwait = 1; in write_fifo()
379 if (count != ep->ep.maxpacket) in write_fifo()
392 done(ep, req, 0); in write_fifo()
420 static int read_fifo(struct omap_ep *ep, struct omap_req *req) in read_fifo() argument
434 if (!ep->double_buf) in read_fifo()
436 ep->fnf = 1; in read_fifo()
442 avail = ep->ep.maxpacket; in read_fifo()
445 ep->fnf = ep->double_buf; in read_fifo()
450 if (count < ep->ep.maxpacket) { in read_fifo()
464 if (!ep->bEndpointAddress) in read_fifo()
467 done(ep, req, 0); in read_fifo()
475 static u16 dma_src_len(struct omap_ep *ep, dma_addr_t start) in dma_src_len() argument
485 end = omap_get_dma_src_pos(ep->lch); in dma_src_len()
486 if (end == ep->dma_counter) in dma_src_len()
495 static u16 dma_dest_len(struct omap_ep *ep, dma_addr_t start) in dma_dest_len() argument
499 end = omap_get_dma_dst_pos(ep->lch); in dma_dest_len()
500 if (end == ep->dma_counter) in dma_dest_len()
517 static void next_in_dma(struct omap_ep *ep, struct omap_req *req) in next_in_dma() argument
528 || (cpu_is_omap15xx() && length < ep->maxpacket)) { in next_in_dma()
530 omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S8, in next_in_dma()
533 length = min(length / ep->maxpacket, in next_in_dma()
536 omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S16, in next_in_dma()
537 ep->ep.maxpacket >> 1, length, sync_mode, in next_in_dma()
539 length *= ep->maxpacket; in next_in_dma()
541 omap_set_dma_src_params(ep->lch, OMAP_DMA_PORT_EMIFF, in next_in_dma()
545 omap_start_dma(ep->lch); in next_in_dma()
546 ep->dma_counter = omap_get_dma_src_pos(ep->lch); in next_in_dma()
548 w |= UDC_TX_DONE_IE(ep->dma_channel); in next_in_dma()
550 omap_writew(UDC_TXN_START | txdma_ctrl, UDC_TXDMA(ep->dma_channel)); in next_in_dma()
554 static void finish_in_dma(struct omap_ep *ep, struct omap_req *req, int status) in finish_in_dma() argument
566 && (req->req.actual % ep->maxpacket) == 0) in finish_in_dma()
569 req->req.actual += dma_src_len(ep, req->req.dma in finish_in_dma()
573 omap_stop_dma(ep->lch); in finish_in_dma()
575 w &= ~UDC_TX_DONE_IE(ep->dma_channel); in finish_in_dma()
577 done(ep, req, status); in finish_in_dma()
580 static void next_out_dma(struct omap_ep *ep, struct omap_req *req) in next_out_dma() argument
587 packets /= ep->ep.maxpacket; in next_out_dma()
589 req->dma_bytes = packets * ep->ep.maxpacket; in next_out_dma()
590 omap_set_dma_transfer_params(ep->lch, OMAP_DMA_DATA_TYPE_S16, in next_out_dma()
591 ep->ep.maxpacket >> 1, packets, in next_out_dma()
594 omap_set_dma_dest_params(ep->lch, OMAP_DMA_PORT_EMIFF, in next_out_dma()
597 ep->dma_counter = omap_get_dma_dst_pos(ep->lch); in next_out_dma()
599 omap_writew(UDC_RXN_STOP | (packets - 1), UDC_RXDMA(ep->dma_channel)); in next_out_dma()
601 w |= UDC_RX_EOT_IE(ep->dma_channel); in next_out_dma()
603 omap_writew(ep->bEndpointAddress & 0xf, UDC_EP_NUM); in next_out_dma()
606 omap_start_dma(ep->lch); in next_out_dma()
610 finish_out_dma(struct omap_ep *ep, struct omap_req *req, int status, int one) in finish_out_dma() argument
615 ep->dma_counter = (u16) (req->req.dma + req->req.actual); in finish_out_dma()
616 count = dma_dest_len(ep, req->req.dma + req->req.actual); in finish_out_dma()
624 omap_stop_dma(ep->lch); in finish_out_dma()
632 w &= ~UDC_RX_EOT_IE(ep->dma_channel); in finish_out_dma()
634 done(ep, req, status); in finish_out_dma()
640 struct omap_ep *ep; in dma_irq() local
645 ep = &udc->ep[16 + UDC_DMA_TX_SRC(dman_stat)]; in dma_irq()
646 ep->irqs++; in dma_irq()
648 if (!list_empty(&ep->queue)) { in dma_irq()
649 req = container_of(ep->queue.next, in dma_irq()
651 finish_in_dma(ep, req, 0); in dma_irq()
655 if (!list_empty(&ep->queue)) { in dma_irq()
656 req = container_of(ep->queue.next, in dma_irq()
658 next_in_dma(ep, req); in dma_irq()
664 ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; in dma_irq()
665 ep->irqs++; in dma_irq()
667 if (!list_empty(&ep->queue)) { in dma_irq()
668 req = container_of(ep->queue.next, in dma_irq()
670 finish_out_dma(ep, req, 0, dman_stat & UDC_DMA_RX_SB); in dma_irq()
674 if (!list_empty(&ep->queue)) { in dma_irq()
675 req = container_of(ep->queue.next, in dma_irq()
677 next_out_dma(ep, req); in dma_irq()
682 ep = &udc->ep[UDC_DMA_RX_SRC(dman_stat)]; in dma_irq()
683 ep->irqs++; in dma_irq()
685 VDBG("%s, RX_CNT irq?\n", ep->ep.name); in dma_irq()
692 struct omap_ep *ep = data; in dma_error() local
696 ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); in dma_error()
701 static void dma_channel_claim(struct omap_ep *ep, unsigned channel) in dma_channel_claim() argument
707 is_in = ep->bEndpointAddress & USB_DIR_IN; in dma_channel_claim()
714 ep->dma_channel = 0; in dma_channel_claim()
715 ep->lch = -1; in dma_channel_claim()
728 reg |= (0x0f & ep->bEndpointAddress) << (4 * (channel - 1)); in dma_channel_claim()
729 ep->dma_channel = channel; in dma_channel_claim()
734 ep->ep.name, dma_error, ep, &ep->lch); in dma_channel_claim()
738 omap_set_dma_src_burst_mode(ep->lch, in dma_channel_claim()
740 omap_set_dma_src_data_pack(ep->lch, 1); in dma_channel_claim()
742 omap_set_dma_dest_params(ep->lch, in dma_channel_claim()
751 ep->ep.name, dma_error, ep, &ep->lch); in dma_channel_claim()
755 omap_set_dma_src_params(ep->lch, in dma_channel_claim()
761 omap_set_dma_dest_burst_mode(ep->lch, in dma_channel_claim()
763 omap_set_dma_dest_data_pack(ep->lch, 1); in dma_channel_claim()
767 ep->dma_channel = 0; in dma_channel_claim()
769 ep->has_dma = 1; in dma_channel_claim()
770 omap_disable_dma_irq(ep->lch, OMAP_DMA_BLOCK_IRQ); in dma_channel_claim()
774 omap_set_dma_channel_mode(ep->lch, OMAP_DMA_LCH_P); in dma_channel_claim()
779 restart = !ep->stopped && !list_empty(&ep->queue); in dma_channel_claim()
782 DBG("%s no dma channel: %d%s\n", ep->ep.name, status, in dma_channel_claim()
785 DBG("%s claimed %cxdma%d lch %d%s\n", ep->ep.name, in dma_channel_claim()
787 ep->dma_channel - 1, ep->lch, in dma_channel_claim()
792 req = container_of(ep->queue.next, struct omap_req, queue); in dma_channel_claim()
793 if (ep->has_dma) in dma_channel_claim()
794 (is_in ? next_in_dma : next_out_dma)(ep, req); in dma_channel_claim()
796 use_ep(ep, UDC_EP_SEL); in dma_channel_claim()
797 (is_in ? write_fifo : read_fifo)(ep, req); in dma_channel_claim()
801 ep->ackwait = 1 + ep->double_buf; in dma_channel_claim()
808 static void dma_channel_release(struct omap_ep *ep) in dma_channel_release() argument
810 int shift = 4 * (ep->dma_channel - 1); in dma_channel_release()
816 if (!list_empty(&ep->queue)) in dma_channel_release()
817 req = container_of(ep->queue.next, struct omap_req, queue); in dma_channel_release()
821 active = omap_get_dma_active_status(ep->lch); in dma_channel_release()
823 DBG("%s release %s %cxdma%d %p\n", ep->ep.name, in dma_channel_release()
825 (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r', in dma_channel_release()
826 ep->dma_channel - 1, req); in dma_channel_release()
833 if (ep->bEndpointAddress & USB_DIR_IN) { in dma_channel_release()
838 finish_in_dma(ep, req, -ECONNRESET); in dma_channel_release()
841 use_ep(ep, UDC_EP_SEL); in dma_channel_release()
855 finish_out_dma(ep, req, -ECONNRESET, 0); in dma_channel_release()
857 omap_free_dma(ep->lch); in dma_channel_release()
858 ep->dma_channel = 0; in dma_channel_release()
859 ep->lch = -1; in dma_channel_release()
869 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_queue() local
881 if (!_ep || (!ep->ep.desc && ep->bEndpointAddress)) { in omap_ep_queue()
885 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) { in omap_ep_queue()
886 if (req->req.length > ep->ep.maxpacket) in omap_ep_queue()
895 && ep->has_dma in omap_ep_queue()
896 && ep->bEndpointAddress != 0 in omap_ep_queue()
897 && (ep->bEndpointAddress & USB_DIR_IN) == 0 in omap_ep_queue()
898 && (req->req.length % ep->ep.maxpacket) != 0) { in omap_ep_queue()
903 udc = ep->udc; in omap_ep_queue()
907 if (use_dma && ep->has_dma) in omap_ep_queue()
909 (ep->bEndpointAddress & USB_DIR_IN)); in omap_ep_queue()
912 ep->ep.name, _req, _req->length, _req->buf); in omap_ep_queue()
926 } else if (list_empty(&ep->queue) && !ep->stopped && !ep->ackwait) { in omap_ep_queue()
929 if (ep->bEndpointAddress == 0) { in omap_ep_queue()
930 if (!udc->ep0_pending || !list_empty(&ep->queue)) { in omap_ep_queue()
965 done(ep, req, 0); in omap_ep_queue()
978 is_in = ep->bEndpointAddress & USB_DIR_IN; in omap_ep_queue()
979 if (!ep->has_dma) in omap_ep_queue()
980 use_ep(ep, UDC_EP_SEL); in omap_ep_queue()
984 if (ep->has_dma) in omap_ep_queue()
985 (is_in ? next_in_dma : next_out_dma)(ep, req); in omap_ep_queue()
987 if ((is_in ? write_fifo : read_fifo)(ep, req) == 1) in omap_ep_queue()
992 ep->ackwait = 1 + ep->double_buf; in omap_ep_queue()
1001 list_add_tail(&req->queue, &ep->queue); in omap_ep_queue()
1009 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_dequeue() local
1016 spin_lock_irqsave(&ep->udc->lock, flags); in omap_ep_dequeue()
1019 list_for_each_entry(req, &ep->queue, queue) { in omap_ep_dequeue()
1024 spin_unlock_irqrestore(&ep->udc->lock, flags); in omap_ep_dequeue()
1028 if (use_dma && ep->dma_channel && ep->queue.next == &req->queue) { in omap_ep_dequeue()
1029 int channel = ep->dma_channel; in omap_ep_dequeue()
1034 dma_channel_release(ep); in omap_ep_dequeue()
1035 dma_channel_claim(ep, channel); in omap_ep_dequeue()
1037 done(ep, req, -ECONNRESET); in omap_ep_dequeue()
1038 spin_unlock_irqrestore(&ep->udc->lock, flags); in omap_ep_dequeue()
1046 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_set_halt() local
1050 spin_lock_irqsave(&ep->udc->lock, flags); in omap_ep_set_halt()
1053 if (ep->bEndpointAddress == 0) { in omap_ep_set_halt()
1054 if (!ep->udc->ep0_pending) in omap_ep_set_halt()
1057 if (ep->udc->ep0_set_config) { in omap_ep_set_halt()
1062 ep->udc->ep0_pending = 0; in omap_ep_set_halt()
1068 } else if (ep->bmAttributes != USB_ENDPOINT_XFER_ISOC && ep->ep.desc) { in omap_ep_set_halt()
1071 if ((ep->bEndpointAddress & USB_DIR_IN) in omap_ep_set_halt()
1072 && !list_empty(&ep->queue)) { in omap_ep_set_halt()
1080 if (use_dma && ep->dma_channel in omap_ep_set_halt()
1081 && !list_empty(&ep->queue)) { in omap_ep_set_halt()
1082 channel = ep->dma_channel; in omap_ep_set_halt()
1083 dma_channel_release(ep); in omap_ep_set_halt()
1087 use_ep(ep, UDC_EP_SEL); in omap_ep_set_halt()
1096 dma_channel_claim(ep, channel); in omap_ep_set_halt()
1098 use_ep(ep, 0); in omap_ep_set_halt()
1099 omap_writew(ep->udc->clr_halt, UDC_CTRL); in omap_ep_set_halt()
1100 ep->ackwait = 0; in omap_ep_set_halt()
1101 if (!(ep->bEndpointAddress & USB_DIR_IN)) { in omap_ep_set_halt()
1103 ep->ackwait = 1 + ep->double_buf; in omap_ep_set_halt()
1108 VDBG("%s %s halt stat %d\n", ep->ep.name, in omap_ep_set_halt()
1111 spin_unlock_irqrestore(&ep->udc->lock, flags); in omap_ep_set_halt()
1331 static void nuke(struct omap_ep *ep, int status) in nuke() argument
1335 ep->stopped = 1; in nuke()
1337 if (use_dma && ep->dma_channel) in nuke()
1338 dma_channel_release(ep); in nuke()
1340 use_ep(ep, 0); in nuke()
1342 if (ep->bEndpointAddress && ep->bmAttributes != USB_ENDPOINT_XFER_ISOC) in nuke()
1345 while (!list_empty(&ep->queue)) { in nuke()
1346 req = list_entry(ep->queue.next, struct omap_req, queue); in nuke()
1347 done(ep, req, status); in nuke()
1354 struct omap_ep *ep; in udc_quiesce() local
1357 nuke(&udc->ep[0], -ESHUTDOWN); in udc_quiesce()
1358 list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) in udc_quiesce()
1359 nuke(ep, -ESHUTDOWN); in udc_quiesce()
1395 struct omap_ep *ep0 = &udc->ep[0]; in ep0_irq()
1515 struct omap_ep *ep; in ep0_irq() local
1569 ep = &udc->ep[w_index & 0xf]; in ep0_irq()
1570 if (ep != ep0) { in ep0_irq()
1572 ep += 16; in ep0_irq()
1573 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC in ep0_irq()
1574 || !ep->ep.desc) in ep0_irq()
1576 use_ep(ep, 0); in ep0_irq()
1578 ep->ackwait = 0; in ep0_irq()
1579 if (!(ep->bEndpointAddress & USB_DIR_IN)) { in ep0_irq()
1581 ep->ackwait = 1 + ep->double_buf; in ep0_irq()
1589 VDBG("%s halt cleared by host\n", ep->name); in ep0_irq()
1598 ep = &udc->ep[w_index & 0xf]; in ep0_irq()
1600 ep += 16; in ep0_irq()
1601 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC in ep0_irq()
1602 || ep == ep0 || !ep->ep.desc) in ep0_irq()
1604 if (use_dma && ep->has_dma) { in ep0_irq()
1608 DBG("%s host set_halt, NYET\n", ep->name); in ep0_irq()
1611 use_ep(ep, 0); in ep0_irq()
1615 VDBG("%s halted by host\n", ep->name); in ep0_irq()
1634 ep = &udc->ep[w_index & 0xf]; in ep0_irq()
1636 ep += 16; in ep0_irq()
1637 if (!ep->ep.desc) in ep0_irq()
1641 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) in ep0_irq()
1645 ERR("%s status, can't report\n", ep->ep.name); in ep0_irq()
1863 struct omap_ep *ep = (void *) _ep; in pio_out_timer() local
1867 spin_lock_irqsave(&ep->udc->lock, flags); in pio_out_timer()
1868 if (!list_empty(&ep->queue) && ep->ackwait) { in pio_out_timer()
1869 use_ep(ep, UDC_EP_SEL); in pio_out_timer()
1873 || (ep->double_buf && HALF_FULL(stat_flg)))) { in pio_out_timer()
1876 VDBG("%s: lose, %04x\n", ep->ep.name, stat_flg); in pio_out_timer()
1877 req = container_of(ep->queue.next, in pio_out_timer()
1879 (void) read_fifo(ep, req); in pio_out_timer()
1880 omap_writew(ep->bEndpointAddress, UDC_EP_NUM); in pio_out_timer()
1882 ep->ackwait = 1 + ep->double_buf; in pio_out_timer()
1886 mod_timer(&ep->timer, PIO_OUT_TIMEOUT); in pio_out_timer()
1887 spin_unlock_irqrestore(&ep->udc->lock, flags); in pio_out_timer()
1894 struct omap_ep *ep; in omap_udc_pio_irq() local
1909 ep = &udc->ep[epnum]; in omap_udc_pio_irq()
1910 ep->irqs++; in omap_udc_pio_irq()
1913 ep->fnf = 0; in omap_udc_pio_irq()
1915 ep->ackwait--; in omap_udc_pio_irq()
1916 if (!list_empty(&ep->queue)) { in omap_udc_pio_irq()
1918 req = container_of(ep->queue.next, in omap_udc_pio_irq()
1920 stat = read_fifo(ep, req); in omap_udc_pio_irq()
1921 if (!ep->double_buf) in omap_udc_pio_irq()
1922 ep->fnf = 1; in omap_udc_pio_irq()
1933 if (ep->fnf) { in omap_udc_pio_irq()
1935 ep->ackwait = 1 + ep->double_buf; in omap_udc_pio_irq()
1937 mod_timer(&ep->timer, PIO_OUT_TIMEOUT); in omap_udc_pio_irq()
1945 ep = &udc->ep[16 + epnum]; in omap_udc_pio_irq()
1946 ep->irqs++; in omap_udc_pio_irq()
1950 ep->ackwait = 0; in omap_udc_pio_irq()
1951 if (!list_empty(&ep->queue)) { in omap_udc_pio_irq()
1952 req = container_of(ep->queue.next, in omap_udc_pio_irq()
1954 (void) write_fifo(ep, req); in omap_udc_pio_irq()
1972 struct omap_ep *ep; in omap_udc_iso_irq() local
1979 list_for_each_entry(ep, &udc->iso, iso) { in omap_udc_iso_irq()
1983 if (ep->has_dma || list_empty(&ep->queue)) in omap_udc_iso_irq()
1985 req = list_entry(ep->queue.next, struct omap_req, queue); in omap_udc_iso_irq()
1987 use_ep(ep, UDC_EP_SEL); in omap_udc_iso_irq()
1993 if (ep->bEndpointAddress & USB_DIR_IN) { in omap_udc_iso_irq()
1997 write_fifo(ep, req); in omap_udc_iso_irq()
2011 read_fifo(ep, req); in omap_udc_iso_irq()
2016 ep->irqs++; in omap_udc_iso_irq()
2017 if (!list_empty(&ep->queue)) in omap_udc_iso_irq()
2049 struct omap_ep *ep; in omap_udc_start() local
2055 list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) { in omap_udc_start()
2056 ep->irqs = 0; in omap_udc_start()
2057 if (ep->bmAttributes == USB_ENDPOINT_XFER_ISOC) in omap_udc_start()
2059 use_ep(ep, 0); in omap_udc_start()
2063 udc->ep[0].irqs = 0; in omap_udc_start()
2144 static void proc_ep_show(struct seq_file *s, struct omap_ep *ep) in proc_ep_show() argument
2150 use_ep(ep, 0); in proc_ep_show()
2152 if (use_dma && ep->has_dma) in proc_ep_show()
2154 (ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r', in proc_ep_show()
2155 ep->dma_channel - 1, ep->lch); in proc_ep_show()
2162 ep->name, buf, in proc_ep_show()
2163 ep->double_buf ? "dbuf " : "", in proc_ep_show()
2165 switch (ep->ackwait) { in proc_ep_show()
2179 ep->irqs, stat_flg, in proc_ep_show()
2194 if (list_empty(&ep->queue)) in proc_ep_show()
2197 list_for_each_entry(req, &ep->queue, queue) { in proc_ep_show()
2201 length += ((ep->bEndpointAddress & USB_DIR_IN) in proc_ep_show()
2203 (ep, req->req.dma + length); in proc_ep_show()
2300 struct omap_ep *ep; in proc_udc_show() local
2426 proc_ep_show(s, &udc->ep[0]); in proc_udc_show()
2428 list_for_each_entry(ep, &udc->gadget.ep_list, in proc_udc_show()
2429 ep.ep_list) { in proc_udc_show()
2430 if (ep->ep.desc) in proc_udc_show()
2431 proc_ep_show(s, ep); in proc_udc_show()
2483 struct omap_ep *ep; in omap_ep_setup() local
2487 ep = &udc->ep[addr & 0xf]; in omap_ep_setup()
2489 ep += 16; in omap_ep_setup()
2492 BUG_ON(ep->name[0]); in omap_ep_setup()
2549 init_timer(&ep->timer); in omap_ep_setup()
2550 ep->timer.function = pio_out_timer; in omap_ep_setup()
2551 ep->timer.data = (unsigned long) ep; in omap_ep_setup()
2573 BUG_ON(strlen(name) >= sizeof ep->name); in omap_ep_setup()
2574 strlcpy(ep->name, name, sizeof ep->name); in omap_ep_setup()
2575 INIT_LIST_HEAD(&ep->queue); in omap_ep_setup()
2576 INIT_LIST_HEAD(&ep->iso); in omap_ep_setup()
2577 ep->bEndpointAddress = addr; in omap_ep_setup()
2578 ep->bmAttributes = type; in omap_ep_setup()
2579 ep->double_buf = dbuf; in omap_ep_setup()
2580 ep->udc = udc; in omap_ep_setup()
2584 ep->ep.caps.type_control = true; in omap_ep_setup()
2585 ep->ep.caps.dir_in = true; in omap_ep_setup()
2586 ep->ep.caps.dir_out = true; in omap_ep_setup()
2589 ep->ep.caps.type_iso = true; in omap_ep_setup()
2592 ep->ep.caps.type_bulk = true; in omap_ep_setup()
2595 ep->ep.caps.type_int = true; in omap_ep_setup()
2600 ep->ep.caps.dir_in = true; in omap_ep_setup()
2602 ep->ep.caps.dir_out = true; in omap_ep_setup()
2604 ep->ep.name = ep->name; in omap_ep_setup()
2605 ep->ep.ops = &omap_ep_ops; in omap_ep_setup()
2606 ep->maxpacket = maxp; in omap_ep_setup()
2607 usb_ep_set_maxpacket_limit(&ep->ep, ep->maxpacket); in omap_ep_setup()
2608 list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list); in omap_ep_setup()
2643 udc->gadget.ep0 = &udc->ep[0].ep; in omap_udc_setup()
2654 list_del_init(&udc->ep[0].ep.ep_list); in omap_udc_setup()