Lines Matching refs:epnum
33 value |= DMISGR1_MF_IN_INT(ep->epnum - 1);
35 value |= DMISGR1_MF_OUTSPK_INT(ep->epnum - 1);
44 value &= ~DMISGR1_MF_IN_INT(ep->epnum - 1);
46 value &= ~DMISGR1_MF_OUTSPK_INT(ep->epnum - 1);
73 if (ep->epnum) {
81 static void fotg210_fifo_ep_mapping(struct fotg210_ep *ep, u32 epnum,
93 val &= ~EPMAP_FIFONOMSK(epnum, dir_in);
94 val |= EPMAP_FIFONO(epnum, dir_in);
99 val &= ~FIFOMAP_EPNOMSK(epnum);
100 val |= FIFOMAP_EPNO(epnum);
105 val |= FIFOCF_FIFO_EN(epnum - 1);
109 static void fotg210_set_fifo_dir(struct fotg210_ep *ep, u32 epnum, u32 dir_in)
115 val |= (dir_in ? FIFOMAP_DIRIN(epnum - 1) : FIFOMAP_DIROUT(epnum - 1));
119 static void fotg210_set_tfrtype(struct fotg210_ep *ep, u32 epnum, u32 type)
125 val |= FIFOCF_TYPE(type, epnum - 1);
129 static void fotg210_set_mps(struct fotg210_ep *ep, u32 epnum, u32 mps,
134 u32 offset = dir_in ? FOTG210_INEPMPSR(epnum) :
135 FOTG210_OUTEPMPSR(epnum);
147 fotg210_set_fifo_dir(ep, ep->epnum, ep->dir_in);
148 fotg210_set_tfrtype(ep, ep->epnum, ep->type);
149 fotg210_set_mps(ep, ep->epnum, ep->ep.maxpacket, ep->dir_in);
150 fotg210_fifo_ep_mapping(ep, ep->epnum, ep->dir_in);
152 fotg210->ep[ep->epnum] = ep;
165 ep->epnum = usb_endpoint_num(desc);
173 static void fotg210_reset_tseq(struct fotg210_udc *fotg210, u8 epnum)
175 struct fotg210_ep *ep = fotg210->ep[epnum];
180 fotg210->reg + FOTG210_INEPMPSR(epnum) :
181 fotg210->reg + FOTG210_OUTEPMPSR(epnum);
198 if (!ep->epnum)
200 ep->epnum = 0;
204 fotg210_reset_tseq(ep->fotg210, ep->epnum);
267 if (ep->epnum)
268 value |= DMATFNR_ACC_FN(ep->epnum - 1);
313 if (ep->epnum) {
315 FOTG210_FIBCR(ep->epnum - 1));
318 FOTG210_FIBCR(ep->epnum - 1));
334 if (ep->epnum) {
341 FOTG210_FIBCR(ep->epnum - 1)) & FIBCR_BCFX;
417 if (!ep->epnum) /* ep0 */
454 } while (!(value & DCFESR_FIFO_EMPTY(ep->epnum - 1)));
458 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) :
459 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum);
472 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) :
473 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum);
497 fotg210_reset_tseq(fotg210, ep->epnum);
651 u8 epnum;
652 epnum = le16_to_cpu(ctrl->wIndex) & USB_ENDPOINT_NUMBER_MASK;
653 if (epnum)
654 fotg210_set_epnstall(fotg210->ep[epnum]);
703 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) :
704 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum);
712 u8 epnum;
722 epnum = ctrl->wIndex & USB_ENDPOINT_NUMBER_MASK;
723 if (epnum)
725 cpu_to_le16(fotg210_is_epnstall(fotg210->ep[epnum])
861 (disgr1 & DISGR1_SPK_INT(ep->epnum - 1)))