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