Lines Matching refs:epnum

79 static void musb_ep_program(struct musb *musb, u8 epnum,
115 ep->epnum, csr))
138 ep->epnum, csr);
153 if (ep->epnum) {
204 int epnum = hw_ep->epnum;
235 musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len);
258 musb_dbg(musb, "SOF for %d", epnum);
266 musb_dbg(musb, "Start TX%d %s", epnum,
312 usb_settoggle(urb->dev, qh->epnum, !is_in, toggle ? 1 : 0);
385 hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh));
413 musb_host_packet_rx(struct musb *musb, struct urb *urb, u8 epnum, u8 iso_err)
421 struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
427 /* musb_ep_select(mbase, epnum); */
429 musb_dbg(musb, "RX%d count %d, buffer %p len %d/%d", epnum, rx_count,
514 musb_rx_reinit(struct musb *musb, struct musb_qh *qh, u8 epnum)
516 struct musb_hw_ep *ep = musb->endpoints + epnum;
546 WARNING("rx%d, packet/%d ready?\n", ep->epnum,
553 musb_write_rxfunaddr(musb, epnum, qh->addr_reg);
554 musb_write_rxhubaddr(musb, epnum, qh->h_addr_reg);
555 musb_write_rxhubport(musb, epnum, qh->h_port_reg);
669 static void musb_ep_program(struct musb *musb, u8 epnum,
677 struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
687 epnum, urb, urb->dev->speed,
688 qh->addr_reg, qh->epnum, is_out ? "out" : "in",
692 musb_ep_select(mbase, epnum);
704 if (use_dma && is_dma_capable() && epnum && dma_controller) {
729 musb_writew(mbase, MUSB_INTRTXE, int_txe & ~(1 << epnum));
732 if (epnum) {
772 musb_write_txfunaddr(musb, epnum, qh->addr_reg);
773 musb_write_txhubaddr(musb, epnum, qh->h_addr_reg);
774 musb_write_txhubport(musb, epnum, qh->h_port_reg);
775 /* FIXME if !epnum, do the same for RX ... */
780 if (epnum) {
843 musb_rx_reinit(musb, qh, epnum);
856 hw_ep->epnum, csr);
890 musb_dbg(musb, "RXCSR%d := %04x", epnum, csr);
910 musb_ep_select(mbase, ep->epnum);
947 usb_settoggle(urb->dev, cur_qh->epnum, !is_in, toggle ? 1 : 0);
1195 void musb_host_tx(struct musb *musb, u8 epnum)
1202 struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
1211 musb_ep_select(mbase, epnum);
1216 musb_dbg(musb, "extra TX%d ready, csr %04x", epnum, tx_csr);
1223 musb_dbg(musb, "OUT/TX%d end, csr %04x%s", epnum, tx_csr,
1229 musb_dbg(musb, "TX end %d stall", epnum);
1236 musb_dbg(musb, "TX 3strikes on ep=%d", epnum);
1243 musb_dbg(musb, "NAK timeout on TX%d ep", epnum);
1246 musb_dbg(musb, "TX ep%d device not responding", epnum);
1255 musb_ep_select(mbase, epnum);
1281 musb_ep_select(mbase, epnum);
1292 musb_dbg(musb, "extra TX%d ready, csr %04x", epnum, tx_csr);
1457 musb_ep_select(mbase, epnum);
1729 void musb_host_rx(struct musb *musb, u8 epnum)
1732 struct musb_hw_ep *hw_ep = musb->endpoints + epnum;
1745 musb_ep_select(mbase, epnum);
1761 epnum, val, musb_readw(epio, MUSB_RXCOUNT));
1771 musb_dbg(musb, "RX end %d STALL", epnum);
1777 dev_err(musb->controller, "ep%d RX three-strikes error", epnum);
1794 musb_dbg(musb, "RX end %d NAK timeout", epnum);
1810 musb_ep_select(mbase, epnum);
1817 musb_dbg(musb, "RX end %d ISO data error", epnum);
1823 epnum);
1843 ERR("RX%d dma busy, csr %04x\n", epnum, rx_csr);
1867 musb_dbg(musb, "RXCSR%d %04x, reqpkt, len %zu%s", epnum, rx_csr,
1871 musb_ep_select(mbase, epnum);
1890 epnum, done ? "off" : "reset",
1907 musb_ep_select(mbase, epnum);
1918 epnum, musb_readw(epio, MUSB_RXCOUNT),
1958 done = musb_host_packet_rx(musb, urb, epnum,
1967 epnum, iso_err);
2000 int best_end, epnum;
2026 for (epnum = 1, hw_ep = musb->endpoints + 1;
2027 epnum < musb->nr_endpoints;
2028 epnum++, hw_ep++) {
2057 hw_ep = musb->endpoints + epnum;
2058 toggle = usb_gettoggle(urb->dev, qh->epnum, !is_in);
2066 best_end = epnum;
2195 qh->epnum = usb_endpoint_num(epd);
2201 type_reg = (qh->type << 4) | qh->epnum;
2313 unsigned hw_end = ep->epnum;
2327 is_in ? 'R' : 'T', ep->epnum,
2334 if (ep->epnum && is_in) {
2340 musb_platform_clear_ep_rxintr(musb, ep->epnum);
2341 } else if (ep->epnum) {