Lines Matching refs:epnum
36 value |= DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_disable_fifo_int()
38 value |= DMISGR1_MF_OUTSPK_INT(ep->epnum - 1); in fotg210_disable_fifo_int()
47 value &= ~DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_enable_fifo_int()
49 value &= ~DMISGR1_MF_OUTSPK_INT(ep->epnum - 1); in fotg210_enable_fifo_int()
76 if (ep->epnum) { in fotg210_done()
84 static void fotg210_fifo_ep_mapping(struct fotg210_ep *ep, u32 epnum, in fotg210_fifo_ep_mapping() argument
96 val &= ~EPMAP_FIFONOMSK(epnum, dir_in); in fotg210_fifo_ep_mapping()
97 val |= EPMAP_FIFONO(epnum, dir_in); in fotg210_fifo_ep_mapping()
102 val &= ~FIFOMAP_EPNOMSK(epnum); in fotg210_fifo_ep_mapping()
103 val |= FIFOMAP_EPNO(epnum); in fotg210_fifo_ep_mapping()
108 val |= FIFOCF_FIFO_EN(epnum - 1); in fotg210_fifo_ep_mapping()
112 static void fotg210_set_fifo_dir(struct fotg210_ep *ep, u32 epnum, u32 dir_in) in fotg210_set_fifo_dir() argument
118 val |= (dir_in ? FIFOMAP_DIRIN(epnum - 1) : FIFOMAP_DIROUT(epnum - 1)); in fotg210_set_fifo_dir()
122 static void fotg210_set_tfrtype(struct fotg210_ep *ep, u32 epnum, u32 type) in fotg210_set_tfrtype() argument
128 val |= FIFOCF_TYPE(type, epnum - 1); in fotg210_set_tfrtype()
132 static void fotg210_set_mps(struct fotg210_ep *ep, u32 epnum, u32 mps, in fotg210_set_mps() argument
137 u32 offset = dir_in ? FOTG210_INEPMPSR(epnum) : in fotg210_set_mps()
138 FOTG210_OUTEPMPSR(epnum); in fotg210_set_mps()
150 fotg210_set_fifo_dir(ep, ep->epnum, ep->dir_in); in fotg210_config_ep()
151 fotg210_set_tfrtype(ep, ep->epnum, ep->type); in fotg210_config_ep()
152 fotg210_set_mps(ep, ep->epnum, ep->ep.maxpacket, ep->dir_in); in fotg210_config_ep()
153 fotg210_fifo_ep_mapping(ep, ep->epnum, ep->dir_in); in fotg210_config_ep()
155 fotg210->ep[ep->epnum] = ep; in fotg210_config_ep()
168 ep->epnum = usb_endpoint_num(desc); in fotg210_ep_enable()
176 static void fotg210_reset_tseq(struct fotg210_udc *fotg210, u8 epnum) in fotg210_reset_tseq() argument
178 struct fotg210_ep *ep = fotg210->ep[epnum]; in fotg210_reset_tseq()
183 fotg210->reg + FOTG210_INEPMPSR(epnum) : in fotg210_reset_tseq()
184 fotg210->reg + FOTG210_OUTEPMPSR(epnum); in fotg210_reset_tseq()
201 if (!ep->epnum) in fotg210_ep_release()
203 ep->epnum = 0; in fotg210_ep_release()
207 fotg210_reset_tseq(ep->fotg210, ep->epnum); in fotg210_ep_release()
270 if (ep->epnum) in fotg210_enable_dma()
271 value |= DMATFNR_ACC_FN(ep->epnum - 1); in fotg210_enable_dma()
316 if (ep->epnum) { in fotg210_wait_dma_done()
318 FOTG210_FIBCR(ep->epnum - 1)); in fotg210_wait_dma_done()
321 FOTG210_FIBCR(ep->epnum - 1)); in fotg210_wait_dma_done()
336 if (ep->epnum) { in fotg210_start_dma()
343 FOTG210_FIBCR(ep->epnum - 1)); in fotg210_start_dma()
423 if (!ep->epnum) /* ep0 */ in fotg210_ep_queue()
460 } while (!(value & DCFESR_FIFO_EMPTY(ep->epnum - 1))); in fotg210_set_epnstall()
464 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) : in fotg210_set_epnstall()
465 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum); in fotg210_set_epnstall()
478 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) : in fotg210_clear_epnstall()
479 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum); in fotg210_clear_epnstall()
504 fotg210_reset_tseq(fotg210, ep->epnum); in fotg210_set_halt_and_wedge()
658 u8 epnum; in fotg210_set_feature() local
659 epnum = le16_to_cpu(ctrl->wIndex) & USB_ENDPOINT_NUMBER_MASK; in fotg210_set_feature()
660 if (epnum) in fotg210_set_feature()
661 fotg210_set_epnstall(fotg210->ep[epnum]); in fotg210_set_feature()
710 fotg210->reg + FOTG210_INEPMPSR(ep->epnum) : in fotg210_is_epnstall()
711 fotg210->reg + FOTG210_OUTEPMPSR(ep->epnum); in fotg210_is_epnstall()
719 u8 epnum; in fotg210_get_status() local
729 epnum = ctrl->wIndex & USB_ENDPOINT_NUMBER_MASK; in fotg210_get_status()
730 if (epnum) in fotg210_get_status()
732 fotg210_is_epnstall(fotg210->ep[epnum]) in fotg210_get_status()