Home
last modified time | relevance | path

Searched refs:epnum (Results 1 – 25 of 83) sorted by relevance

1234

/drivers/usb/musb/
Dmusb_regs.h364 static inline void musb_write_rxfunaddr(struct musb *musb, u8 epnum, in musb_write_rxfunaddr() argument
368 musb->io.busctl_offset(epnum, MUSB_RXFUNCADDR), in musb_write_rxfunaddr()
372 static inline void musb_write_rxhubaddr(struct musb *musb, u8 epnum, in musb_write_rxhubaddr() argument
375 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBADDR), in musb_write_rxhubaddr()
379 static inline void musb_write_rxhubport(struct musb *musb, u8 epnum, in musb_write_rxhubport() argument
382 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBPORT), in musb_write_rxhubport()
386 static inline void musb_write_txfunaddr(struct musb *musb, u8 epnum, in musb_write_txfunaddr() argument
390 musb->io.busctl_offset(epnum, MUSB_TXFUNCADDR), in musb_write_txfunaddr()
394 static inline void musb_write_txhubaddr(struct musb *musb, u8 epnum, in musb_write_txhubaddr() argument
397 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_TXHUBADDR), in musb_write_txhubaddr()
[all …]
Dblackfin.c36 static u32 bfin_fifo_offset(u8 epnum) in bfin_fifo_offset() argument
38 return USB_OFFSET(USB_EP0_FIFO) + (epnum * 8); in bfin_fifo_offset()
79 u8 epnum = hw_ep->epnum; in bfin_write_fifo() local
86 hw_ep->epnum, fifo, len, src, epio); in bfin_write_fifo()
90 if (!ANOMALY_05000380 && epnum != 0) { in bfin_write_fifo()
98 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_LOW), dma_reg); in bfin_write_fifo()
102 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_ADDR_HIGH), dma_reg); in bfin_write_fifo()
106 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_COUNT_LOW), len); in bfin_write_fifo()
107 bfin_write16(USB_DMA_REG(epnum, USB_DMAx_COUNT_HIGH), 0); in bfin_write_fifo()
111 dma_reg = (epnum << 4) | DMA_ENA | INT_ENA | DIRECTION; in bfin_write_fifo()
[all …]
Dmusb_host.c104 static void musb_ep_program(struct musb *musb, u8 epnum,
140 ep->epnum, csr)) in musb_h_tx_flush_fifo()
163 ep->epnum, csr); in musb_h_ep0_flush_fifo()
178 if (ep->epnum) { in musb_h_tx_start()
230 int epnum = hw_ep->epnum; in musb_start_urb() local
261 musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len); in musb_start_urb()
285 musb_dbg(musb, "SOF for %d", epnum); in musb_start_urb()
293 musb_dbg(musb, "Start TX%d %s", epnum, in musb_start_urb()
333 usb_settoggle(urb->dev, qh->epnum, !is_in, csr ? 1 : 0); in musb_save_toggle()
423 hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh)); in musb_advance_schedule()
[all …]
Dmusb_gadget.c250 u8 epnum = req->epnum; in txstate() local
252 void __iomem *epio = musb->endpoints[epnum].regs; in txstate()
292 epnum, musb_ep->packet_sz, fifo_count, in txstate()
431 void musb_g_tx(struct musb *musb, u8 epnum) in musb_g_tx() argument
437 struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_in; in musb_g_tx()
438 void __iomem *epio = musb->endpoints[epnum].regs; in musb_g_tx()
441 musb_ep_select(mbase, epnum); in musb_g_tx()
467 epnum, request); in musb_g_tx()
492 epnum, csr, musb_ep->dma->actual_len, request); in musb_g_tx()
525 musb_ep_select(mbase, epnum); in musb_g_tx()
[all …]
Dtusb6010_omap.c36 int epnum; member
70 chdat->epnum, reg & 0xf); in tusb_omap_use_shared_dmareq()
75 reg = (1 << 4) | chdat->epnum; in tusb_omap_use_shared_dmareq()
77 reg = chdat->epnum; in tusb_omap_use_shared_dmareq()
88 if ((reg & 0xf) != chdat->epnum) { in tusb_omap_free_shared_dmareq()
90 chdat->epnum, reg & 0xf); in tusb_omap_free_shared_dmareq()
115 chdat->epnum, chdat->tx ? "tx" : "rx"); in tusb_omap_dma_cb()
161 musb_dma_completion(musb, chdat->epnum, chdat->tx); in tusb_omap_dma_cb()
173 musb_ep_select(mbase, chdat->epnum); in tusb_omap_dma_cb()
244 dev_dbg(musb->controller, "could not get dma for ep%i\n", chdat->epnum); in tusb_omap_dma_program()
[all …]
Dmusb_core.h193 u32 (*ep_offset)(u8 epnum, u16 offset);
194 void (*ep_select)(void __iomem *mbase, u8 epnum);
196 u32 (*fifo_offset)(u8 epnum);
197 u32 (*busctl_offset)(u8 epnum, u16 offset);
222 void (*clear_ep_rxintr)(struct musb *musb, int epnum);
240 u8 epnum; member
496 struct musb_hw_ep *hw_ep, u8 epnum) in musb_read_fifosize() argument
499 musb->epmask |= (1 << epnum); in musb_read_fifosize()
501 if (epnum < 5) { in musb_read_fifosize()
523 struct musb_hw_ep *hw_ep, u8 epnum) in musb_read_fifosize() argument
[all …]
Dmusb_gadget_ep0.c81 u8 result[2], epnum = 0; in service_tx_status_request() local
110 epnum = (u8) ctrlrequest->wIndex; in service_tx_status_request()
111 if (!epnum) { in service_tx_status_request()
116 is_in = epnum & USB_DIR_IN; in service_tx_status_request()
117 epnum &= 0x0f; in service_tx_status_request()
118 if (epnum >= MUSB_C_NUM_EPS) { in service_tx_status_request()
124 ep = &musb->endpoints[epnum].ep_in; in service_tx_status_request()
126 ep = &musb->endpoints[epnum].ep_out; in service_tx_status_request()
127 regs = musb->endpoints[epnum].regs; in service_tx_status_request()
134 musb_ep_select(mbase, epnum); in service_tx_status_request()
[all …]
Dmusbhsdma.c79 musb_channel->epnum = hw_ep->epnum; in dma_channel_allocate()
130 csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT) in configure_channel()
156 musb_channel->epnum, in dma_channel_program()
206 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort()
219 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort()
327 u8 epnum = musb_channel->epnum; in dma_controller_irq() local
328 int offset = musb->io.ep_offset(epnum, in dma_controller_irq()
336 musb_ep_select(mbase, epnum); in dma_controller_irq()
349 musb_dma_completion(musb, musb_channel->epnum, in dma_controller_irq()
Dmusb_core.c248 static u32 musb_default_fifo_offset(u8 epnum) in musb_default_fifo_offset() argument
250 return 0x20 + (epnum * 4); in musb_default_fifo_offset()
254 static void musb_flat_ep_select(void __iomem *mbase, u8 epnum) in musb_flat_ep_select() argument
258 static u32 musb_flat_ep_offset(u8 epnum, u16 offset) in musb_flat_ep_offset() argument
260 return 0x100 + (0x10 * epnum) + offset; in musb_flat_ep_offset()
264 static void musb_indexed_ep_select(void __iomem *mbase, u8 epnum) in musb_indexed_ep_select() argument
266 musb_writeb(mbase, MUSB_INDEX, epnum); in musb_indexed_ep_select()
269 static u32 musb_indexed_ep_offset(u8 epnum, u16 offset) in musb_indexed_ep_offset() argument
274 static u32 musb_default_busctl_offset(u8 epnum, u16 offset) in musb_default_busctl_offset() argument
276 return 0x80 + (0x08 * epnum) + offset; in musb_default_busctl_offset()
[all …]
Dmusb_io.h54 u32 (*ep_offset)(u8 epnum, u16 offset);
55 void (*ep_select)(void __iomem *mbase, u8 epnum);
56 u32 (*fifo_offset)(u8 epnum);
59 u32 (*busctl_offset)(u8 epnum, u16 offset);
/drivers/usb/mtu3/
Dmtu3_qmu.c140 int epnum = mep->epnum; in mtu3_qmu_resume() local
143 offset = mep->is_in ? USB_QMU_TQCSR(epnum) : USB_QMU_RQCSR(epnum); in mtu3_qmu_resume()
207 mep->epnum, gpd, enq); in mtu3_prepare_tx_gpd()
240 mep->epnum, gpd, enq); in mtu3_prepare_rx_gpd()
266 u8 epnum = mep->epnum; in mtu3_qmu_start() local
270 mtu3_writel(mbase, USB_QMU_TQSAR(mep->epnum), ring->dma); in mtu3_qmu_start()
271 mtu3_setbits(mbase, MU3D_EP_TXCR0(mep->epnum), TX_DMAREQEN); in mtu3_qmu_start()
272 mtu3_setbits(mbase, U3D_QCR0, QMU_TX_CS_EN(epnum)); in mtu3_qmu_start()
274 mtu3_setbits(mbase, U3D_QCR1, QMU_TX_ZLP(epnum)); in mtu3_qmu_start()
276 QMU_TX_LEN_ERR(epnum) | QMU_TX_CS_ERR(epnum)); in mtu3_qmu_start()
[all …]
Dmtu3.h41 #define MU3D_EP_TXCR0(epnum) (U3D_TX1CSR0 + (((epnum) - 1) * 0x10)) argument
42 #define MU3D_EP_TXCR1(epnum) (U3D_TX1CSR1 + (((epnum) - 1) * 0x10)) argument
43 #define MU3D_EP_TXCR2(epnum) (U3D_TX1CSR2 + (((epnum) - 1) * 0x10)) argument
45 #define MU3D_EP_RXCR0(epnum) (U3D_RX1CSR0 + (((epnum) - 1) * 0x10)) argument
46 #define MU3D_EP_RXCR1(epnum) (U3D_RX1CSR1 + (((epnum) - 1) * 0x10)) argument
47 #define MU3D_EP_RXCR2(epnum) (U3D_RX1CSR2 + (((epnum) - 1) * 0x10)) argument
49 #define USB_QMU_RQCSR(epnum) (U3D_RXQCSR1 + (((epnum) - 1) * 0x10)) argument
50 #define USB_QMU_RQSAR(epnum) (U3D_RXQSAR1 + (((epnum) - 1) * 0x10)) argument
51 #define USB_QMU_RQCPR(epnum) (U3D_RXQCPR1 + (((epnum) - 1) * 0x10)) argument
53 #define USB_QMU_TQCSR(epnum) (U3D_TXQCSR1 + (((epnum) - 1) * 0x10)) argument
[all …]
Dmtu3_core.c206 u8 epnum = mep->epnum; in mtu3_ep_stall_set() local
210 csr = mtu3_readl(mbase, MU3D_EP_TXCR0(epnum)) & TX_W1C_BITS; in mtu3_ep_stall_set()
215 mtu3_writel(mbase, MU3D_EP_TXCR0(epnum), csr); in mtu3_ep_stall_set()
217 csr = mtu3_readl(mbase, MU3D_EP_RXCR0(epnum)) & RX_W1C_BITS; in mtu3_ep_stall_set()
222 mtu3_writel(mbase, MU3D_EP_RXCR0(epnum), csr); in mtu3_ep_stall_set()
226 mtu3_setbits(mbase, U3D_EP_RST, EP_RST(mep->is_in, epnum)); in mtu3_ep_stall_set()
227 mtu3_clrbits(mbase, U3D_EP_RST, EP_RST(mep->is_in, epnum)); in mtu3_ep_stall_set()
292 int epnum = mep->epnum; in mtu3_config_ep() local
332 mtu3_setbits(mbase, U3D_QIESR0, QMU_TX_DONE_INT(epnum)); in mtu3_config_ep()
334 mtu3_writel(mbase, MU3D_EP_TXCR0(epnum), csr0); in mtu3_config_ep()
[all …]
Dmtu3_gadget.c40 if (mep->epnum) in mtu3_req_complete()
63 if (mep->epnum) in nuke()
181 if (usb_endpoint_num(desc) != mep->epnum) in mtu3_gadget_ep_enable()
251 mreq->epnum = mep->epnum; in mtu3_alloc_request()
286 __func__, mep->is_in ? "TX" : "RX", mreq->epnum, ep->name, in mtu3_gadget_queue()
597 u32 epnum, u32 is_in) in init_hw_ep() argument
599 mep->epnum = epnum; in init_hw_ep()
605 sprintf(mep->name, "ep%d%s", epnum, in init_hw_ep()
606 !epnum ? "" : (is_in ? "in" : "out")); in init_hw_ep()
612 if (!epnum) { in init_hw_ep()
[all …]
Dmtu3_gadget_ep0.c92 __func__, mep->epnum, len, src); in ep0_write_fifo()
113 __func__, mep->epnum, len, dst); in ep0_read_fifo()
208 u8 epnum = 0; in ep0_get_status() local
228 epnum = (u8) le16_to_cpu(setup->wIndex); in ep0_get_status()
229 is_in = epnum & USB_DIR_IN; in ep0_get_status()
230 epnum &= USB_ENDPOINT_NUMBER_MASK; in ep0_get_status()
232 if (epnum >= mtu->num_eps) { in ep0_get_status()
236 if (!epnum) in ep0_get_status()
239 mep = (is_in ? mtu->in_eps : mtu->out_eps) + epnum; in ep0_get_status()
376 u8 epnum; in ep0_handle_feature() local
[all …]
/drivers/usb/gadget/udc/
Dfotg210-udc.c36 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()
[all …]
Dfusb300_udc.c61 ep->epnum = info.epnum; in fusb300_ep_setting()
67 if (!ep->epnum) in fusb300_ep_release()
69 ep->epnum = 0; in fusb300_ep_release()
106 u32 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET2(info.epnum)); in fusb300_set_epaddrofs()
110 iowrite32(reg, fusb300->reg + FUSB300_OFFSET_EPSET2(info.epnum)); in fusb300_set_epaddrofs()
117 fusb300_set_fifo_entry(fusb300, info.epnum); in ep_fifo_setting()
118 fusb300_set_start_entry(fusb300, info.epnum); in ep_fifo_setting()
125 u32 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_eptype()
129 iowrite32(reg, fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_eptype()
139 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_epdir()
[all …]
Ds3c-hsudc.c292 int epnum; in s3c_hsudc_stop_activity() local
296 for (epnum = 0; epnum < hsudc->pd->epnum; epnum++) { in s3c_hsudc_stop_activity()
297 hsep = &hsudc->ep[epnum]; in s3c_hsudc_stop_activity()
595 u8 epnum; in s3c_hsudc_process_req_status() local
607 epnum = le16_to_cpu(ctrl->wIndex) & USB_ENDPOINT_NUMBER_MASK; in s3c_hsudc_process_req_status()
608 hsep = &hsudc->ep[epnum]; in s3c_hsudc_process_req_status()
977 struct s3c_hsudc_ep *hsep, int epnum) in s3c_hsudc_initep() argument
981 if ((epnum % 2) == 0) { in s3c_hsudc_initep()
988 hsep->bEndpointAddress |= epnum; in s3c_hsudc_initep()
989 if (epnum) in s3c_hsudc_initep()
[all …]
Dgoku_udc.h138 #define DATASET_A(epnum) (1<<(2*(epnum))) argument
139 #define DATASET_B(epnum) (2<<(2*(epnum))) argument
140 #define DATASET_AB(epnum) (3<<(2*(epnum))) argument
Dfsl_qe_udc.c149 u8 epnum = ep->epnum; in qe_eprx_stall_change() local
152 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eprx_stall_change()
159 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eprx_stall_change()
166 u8 epnum = ep->epnum; in qe_eptx_stall_change() local
169 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eptx_stall_change()
176 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eptx_stall_change()
192 u8 epnum = ep->epnum; in qe_eprx_nack() local
197 clrsetbits_be16(&udc->usb_regs->usb_usep[epnum], in qe_eprx_nack()
214 clrsetbits_be16(&udc->usb_regs->usb_usep[ep->epnum], in qe_eprx_normal()
233 cpm_command(CPM_USB_STOP_TX | (ep->epnum << CPM_USB_EP_SHIFT), in qe_ep_cmd_stoptx()
[all …]
/drivers/usb/gadget/udc/bdc/
Dbdc_cmd.c291 int bdc_ep_set_stall(struct bdc *bdc, int epnum) in bdc_ep_set_stall() argument
295 dev_dbg(bdc->dev, "%s epnum=%d\n", __func__, epnum); in bdc_ep_set_stall()
297 cmd_sc |= BDC_SUB_CMD_EP_STL | BDC_CMD_EPN(epnum) | BDC_CMD_EPO; in bdc_ep_set_stall()
303 int bdc_ep_clear_stall(struct bdc *bdc, int epnum) in bdc_ep_clear_stall() argument
309 dev_dbg(bdc->dev, "%s: epnum=%d\n", __func__, epnum); in bdc_ep_clear_stall()
310 ep = bdc->bdc_ep_array[epnum]; in bdc_ep_clear_stall()
315 if (epnum != 1) { in bdc_ep_clear_stall()
318 ret = bdc_ep_set_stall(bdc, epnum); in bdc_ep_clear_stall()
324 if (epnum != 1) in bdc_ep_clear_stall()
328 cmd_sc |= BDC_SUB_CMD_EP_RST | BDC_CMD_EPN(epnum) | BDC_CMD_EPO; in bdc_ep_clear_stall()
[all …]
Dbdc_ep.c347 void bdc_notify_xfr(struct bdc *bdc, u32 epnum) in bdc_notify_xfr() argument
349 struct bdc_ep *ep = bdc->bdc_ep_array[epnum]; in bdc_notify_xfr()
351 dev_vdbg(bdc->dev, "%s epnum:%d\n", __func__, epnum); in bdc_notify_xfr()
359 bdc_writel(bdc->regs, BDC_XSFNTF, epnum); in bdc_notify_xfr()
672 req->epnum = ep->ep_num; in ep0_queue()
728 req->epnum = ep->ep_num; in ep_queue()
908 u8 epnum; in bdc_free_ep() local
911 for (epnum = 1; epnum < bdc->num_eps; epnum++) { in bdc_free_ep()
912 ep = bdc->bdc_ep_array[epnum]; in bdc_free_ep()
920 if (epnum != 1) in bdc_free_ep()
[all …]
/drivers/staging/emxx_udc/
Demxx_udc.c62 #define _nbu2ss_zero_len_pkt(udc, epnum) \ argument
63 _nbu2ss_ep_in_end(udc, epnum, 0, 0)
227 if (ep->epnum == 0) in _nbu2ss_ep_init()
230 num = ep->epnum - 1; in _nbu2ss_ep_init()
240 data = 1 << (ep->epnum + 8); in _nbu2ss_ep_init()
265 _nbu2ss_endpoint_toggle_reset(udc, (ep->epnum | ep->direct)); in _nbu2ss_ep_init()
301 if ((ep->epnum == 0) || (udc->vbus_active == 0)) in _nbu2ss_epn_exit()
304 num = ep->epnum - 1; in _nbu2ss_epn_exit()
312 data = 1 << (ep->epnum + 8); in _nbu2ss_epn_exit()
350 if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0)) in _nbu2ss_ep_dma_init()
[all …]
/drivers/usb/usbip/
Dstub_rx.c344 int epnum = pdu->base.ep; in get_pipe() local
347 if (epnum < 0 || epnum > 15) in get_pipe()
351 ep = udev->ep_in[epnum & 0x7f]; in get_pipe()
353 ep = udev->ep_out[epnum & 0x7f]; in get_pipe()
361 return usb_sndctrlpipe(udev, epnum); in get_pipe()
363 return usb_rcvctrlpipe(udev, epnum); in get_pipe()
368 return usb_sndbulkpipe(udev, epnum); in get_pipe()
370 return usb_rcvbulkpipe(udev, epnum); in get_pipe()
375 return usb_sndintpipe(udev, epnum); in get_pipe()
377 return usb_rcvintpipe(udev, epnum); in get_pipe()
[all …]
/drivers/usb/dwc3/
Dgadget.c725 static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum, bool force);
871 req->epnum = dep->number; in dwc3_gadget_ep_alloc_request()
1332 req->epnum = dep->number; in __dwc3_gadget_ep_queue()
1990 int epnum; in dwc3_gadget_stop() local
1999 for (epnum = 2; epnum < DWC3_ENDPOINTS_NUM; epnum++) { in dwc3_gadget_stop()
2000 struct dwc3_ep *dep = dwc->eps[epnum]; in dwc3_gadget_stop()
2095 u8 epnum; in dwc3_gadget_init_endpoints() local
2099 for (epnum = 0; epnum < total; epnum++) { in dwc3_gadget_init_endpoints()
2100 bool direction = epnum & 1; in dwc3_gadget_init_endpoints()
2101 u8 num = epnum >> 1; in dwc3_gadget_init_endpoints()
[all …]

1234