Home
last modified time | relevance | path

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

1234

/Linux-v6.6/drivers/usb/mtu3/
Dmtu3.h35 #define MU3D_EP_TXCR0(epnum) (U3D_TX1CSR0 + (((epnum) - 1) * 0x10)) argument
36 #define MU3D_EP_TXCR1(epnum) (U3D_TX1CSR1 + (((epnum) - 1) * 0x10)) argument
37 #define MU3D_EP_TXCR2(epnum) (U3D_TX1CSR2 + (((epnum) - 1) * 0x10)) argument
39 #define MU3D_EP_RXCR0(epnum) (U3D_RX1CSR0 + (((epnum) - 1) * 0x10)) argument
40 #define MU3D_EP_RXCR1(epnum) (U3D_RX1CSR1 + (((epnum) - 1) * 0x10)) argument
41 #define MU3D_EP_RXCR2(epnum) (U3D_RX1CSR2 + (((epnum) - 1) * 0x10)) argument
43 #define USB_QMU_TQHIAR(epnum) (U3D_TXQHIAR1 + (((epnum) - 1) * 0x4)) argument
44 #define USB_QMU_RQHIAR(epnum) (U3D_RXQHIAR1 + (((epnum) - 1) * 0x4)) argument
46 #define USB_QMU_RQCSR(epnum) (U3D_RXQCSR1 + (((epnum) - 1) * 0x10)) argument
47 #define USB_QMU_RQSAR(epnum) (U3D_RXQSAR1 + (((epnum) - 1) * 0x10)) argument
[all …]
Dmtu3_qmu.c73 static dma_addr_t read_txq_cur_addr(void __iomem *mbase, u8 epnum) in read_txq_cur_addr() argument
78 txcpr = mtu3_readl(mbase, USB_QMU_TQCPR(epnum)); in read_txq_cur_addr()
79 txhiar = mtu3_readl(mbase, USB_QMU_TQHIAR(epnum)); in read_txq_cur_addr()
84 static dma_addr_t read_rxq_cur_addr(void __iomem *mbase, u8 epnum) in read_rxq_cur_addr() argument
89 rxcpr = mtu3_readl(mbase, USB_QMU_RQCPR(epnum)); in read_rxq_cur_addr()
90 rxhiar = mtu3_readl(mbase, USB_QMU_RQHIAR(epnum)); in read_rxq_cur_addr()
95 static void write_txq_start_addr(void __iomem *mbase, u8 epnum, dma_addr_t dma) in write_txq_start_addr() argument
99 mtu3_writel(mbase, USB_QMU_TQSAR(epnum), in write_txq_start_addr()
101 tqhiar = mtu3_readl(mbase, USB_QMU_TQHIAR(epnum)); in write_txq_start_addr()
104 mtu3_writel(mbase, USB_QMU_TQHIAR(epnum), tqhiar); in write_txq_start_addr()
[all …]
Dmtu3_core.c301 u32 rst_bit = EP_RST(mep->is_in, mep->epnum); in mtu3_ep_reset()
312 u8 epnum = mep->epnum; in mtu3_ep_stall_set() local
316 csr = mtu3_readl(mbase, MU3D_EP_TXCR0(epnum)) & TX_W1C_BITS; in mtu3_ep_stall_set()
321 mtu3_writel(mbase, MU3D_EP_TXCR0(epnum), csr); in mtu3_ep_stall_set()
323 csr = mtu3_readl(mbase, MU3D_EP_RXCR0(epnum)) & RX_W1C_BITS; in mtu3_ep_stall_set()
328 mtu3_writel(mbase, MU3D_EP_RXCR0(epnum), csr); in mtu3_ep_stall_set()
409 int epnum = mep->epnum; in mtu3_config_ep() local
449 mtu3_setbits(mbase, U3D_QIESR0, QMU_TX_DONE_INT(epnum)); in mtu3_config_ep()
451 mtu3_writel(mbase, MU3D_EP_TXCR0(epnum), csr0); in mtu3_config_ep()
452 mtu3_writel(mbase, MU3D_EP_TXCR1(epnum), csr1); in mtu3_config_ep()
[all …]
Dmtu3_gadget.c28 if (mep->epnum) in mtu3_req_complete()
49 if (mep->epnum) in nuke()
172 if (usb_endpoint_num(desc) != mep->epnum) in mtu3_gadget_ep_enable()
242 mreq->epnum = mep->epnum; in mtu3_alloc_request()
274 __func__, mep->is_in ? "TX" : "RX", mreq->epnum, ep->name, in mtu3_gadget_queue()
647 u32 epnum, u32 is_in) in init_hw_ep() argument
649 mep->epnum = epnum; in init_hw_ep()
655 sprintf(mep->name, "ep%d%s", epnum, in init_hw_ep()
656 !epnum ? "" : (is_in ? "in" : "out")); in init_hw_ep()
662 if (!epnum) { in init_hw_ep()
[all …]
Dmtu3_debugfs.c148 int epnum = mep->epnum; in mtu3_debugfs_ep_regset() local
156 regs[0].offset = in ? MU3D_EP_TXCR0(epnum) : MU3D_EP_RXCR0(epnum); in mtu3_debugfs_ep_regset()
158 regs[1].offset = in ? MU3D_EP_TXCR1(epnum) : MU3D_EP_RXCR1(epnum); in mtu3_debugfs_ep_regset()
160 regs[2].offset = in ? MU3D_EP_TXCR2(epnum) : MU3D_EP_RXCR2(epnum); in mtu3_debugfs_ep_regset()
162 regs[3].offset = in ? USB_QMU_TQHIAR(epnum) : USB_QMU_RQHIAR(epnum); in mtu3_debugfs_ep_regset()
164 regs[4].offset = in ? USB_QMU_TQCSR(epnum) : USB_QMU_RQCSR(epnum); in mtu3_debugfs_ep_regset()
166 regs[5].offset = in ? USB_QMU_TQSAR(epnum) : USB_QMU_RQSAR(epnum); in mtu3_debugfs_ep_regset()
168 regs[6].offset = in ? USB_QMU_TQCPR(epnum) : USB_QMU_RQCPR(epnum); in mtu3_debugfs_ep_regset()
/Linux-v6.6/drivers/usb/musb/
Dmusb_regs.h282 static inline void musb_write_rxfunaddr(struct musb *musb, u8 epnum, in musb_write_rxfunaddr() argument
286 musb->io.busctl_offset(epnum, MUSB_RXFUNCADDR), in musb_write_rxfunaddr()
290 static inline void musb_write_rxhubaddr(struct musb *musb, u8 epnum, in musb_write_rxhubaddr() argument
293 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBADDR), in musb_write_rxhubaddr()
297 static inline void musb_write_rxhubport(struct musb *musb, u8 epnum, in musb_write_rxhubport() argument
300 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_RXHUBPORT), in musb_write_rxhubport()
304 static inline void musb_write_txfunaddr(struct musb *musb, u8 epnum, in musb_write_txfunaddr() argument
308 musb->io.busctl_offset(epnum, MUSB_TXFUNCADDR), in musb_write_txfunaddr()
312 static inline void musb_write_txhubaddr(struct musb *musb, u8 epnum, in musb_write_txhubaddr() argument
315 musb_writeb(musb->mregs, musb->io.busctl_offset(epnum, MUSB_TXHUBADDR), in musb_write_txhubaddr()
[all …]
Dmusb_host.c79 static void musb_ep_program(struct musb *musb, u8 epnum,
115 ep->epnum, csr)) in musb_h_tx_flush_fifo()
138 ep->epnum, csr); in musb_h_ep0_flush_fifo()
153 if (ep->epnum) { in musb_h_tx_start()
204 int epnum = hw_ep->epnum; in musb_start_urb() local
235 musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len); in musb_start_urb()
258 musb_dbg(musb, "SOF for %d", epnum); in musb_start_urb()
266 musb_dbg(musb, "Start TX%d %s", epnum, in musb_start_urb()
312 usb_settoggle(urb->dev, qh->epnum, !is_in, toggle ? 1 : 0); in musb_advance_schedule()
385 hw_ep->epnum, is_in ? 'R' : 'T', next_urb(qh)); in musb_advance_schedule()
[all …]
Dmusb_gadget.c225 u8 epnum = req->epnum; in txstate() local
227 void __iomem *epio = musb->endpoints[epnum].regs; in txstate()
267 epnum, musb_ep->packet_sz, fifo_count, in txstate()
406 void musb_g_tx(struct musb *musb, u8 epnum) in musb_g_tx() argument
412 struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_in; in musb_g_tx()
413 void __iomem *epio = musb->endpoints[epnum].regs; in musb_g_tx()
416 musb_ep_select(mbase, epnum); in musb_g_tx()
442 epnum, request); in musb_g_tx()
467 epnum, csr, musb_ep->dma->actual_len, request); in musb_g_tx()
500 musb_ep_select(mbase, epnum); in musb_g_tx()
[all …]
Dtusb6010_omap.c33 int epnum; member
67 chdat->epnum, reg & 0xf); in tusb_omap_use_shared_dmareq()
72 reg = (1 << 4) | chdat->epnum; in tusb_omap_use_shared_dmareq()
74 reg = chdat->epnum; in tusb_omap_use_shared_dmareq()
85 if ((reg & 0xf) != chdat->epnum) { in tusb_omap_free_shared_dmareq()
87 chdat->epnum, reg & 0xf); in tusb_omap_free_shared_dmareq()
112 chdat->epnum, chdat->tx ? "tx" : "rx"); in tusb_omap_dma_cb()
158 musb_dma_completion(musb, chdat->epnum, chdat->tx); in tusb_omap_dma_cb()
170 musb_ep_select(mbase, chdat->epnum); in tusb_omap_dma_cb()
241 dev_dbg(musb->controller, "could not get dma for ep%i\n", chdat->epnum); in tusb_omap_dma_program()
[all …]
Dmusb_gadget_ep0.c56 u8 result[2], epnum = 0; in service_tx_status_request() local
85 epnum = (u8) ctrlrequest->wIndex; in service_tx_status_request()
86 if (!epnum) { in service_tx_status_request()
91 is_in = epnum & USB_DIR_IN; in service_tx_status_request()
92 epnum &= 0x0f; in service_tx_status_request()
93 if (epnum >= MUSB_C_NUM_EPS) { in service_tx_status_request()
99 ep = &musb->endpoints[epnum].ep_in; in service_tx_status_request()
101 ep = &musb->endpoints[epnum].ep_out; in service_tx_status_request()
102 regs = musb->endpoints[epnum].regs; in service_tx_status_request()
109 musb_ep_select(mbase, epnum); in service_tx_status_request()
[all …]
Dmusbhsdma.c60 u8 epnum; member
113 musb_channel->epnum = hw_ep->epnum; in dma_channel_allocate()
164 csr |= (musb_channel->epnum << MUSB_HSDMA_ENDPOINT_SHIFT) in configure_channel()
190 musb_channel->epnum, in dma_channel_program()
232 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort()
245 offset = musb->io.ep_offset(musb_channel->epnum, in dma_channel_abort()
344 u8 epnum = musb_channel->epnum; in dma_controller_irq() local
345 int offset = musb->io.ep_offset(epnum, in dma_controller_irq()
353 musb_ep_select(mbase, epnum); in dma_controller_irq()
366 musb_dma_completion(musb, musb_channel->epnum, in dma_controller_irq()
Dmusb_io.h29 u32 (*ep_offset)(u8 epnum, u16 offset);
30 void (*ep_select)(void __iomem *mbase, u8 epnum);
31 u32 (*fifo_offset)(u8 epnum);
34 u32 (*busctl_offset)(u8 epnum, u16 offset);
Dmusb_core.c219 static u32 musb_default_fifo_offset(u8 epnum) in musb_default_fifo_offset() argument
221 return 0x20 + (epnum * 4); in musb_default_fifo_offset()
225 static void musb_flat_ep_select(void __iomem *mbase, u8 epnum) in musb_flat_ep_select() argument
229 static u32 musb_flat_ep_offset(u8 epnum, u16 offset) in musb_flat_ep_offset() argument
231 return 0x100 + (0x10 * epnum) + offset; in musb_flat_ep_offset()
235 static void musb_indexed_ep_select(void __iomem *mbase, u8 epnum) in musb_indexed_ep_select() argument
237 musb_writeb(mbase, MUSB_INDEX, epnum); in musb_indexed_ep_select()
240 static u32 musb_indexed_ep_offset(u8 epnum, u16 offset) in musb_indexed_ep_offset() argument
245 static u32 musb_default_busctl_offset(u8 epnum, u16 offset) in musb_default_busctl_offset() argument
247 return 0x80 + (0x08 * epnum) + offset; in musb_default_busctl_offset()
[all …]
Dmusb_core.h164 u32 (*ep_offset)(u8 epnum, u16 offset);
165 void (*ep_select)(void __iomem *mbase, u8 epnum);
167 u32 (*fifo_offset)(u8 epnum);
168 u32 (*busctl_offset)(u8 epnum, u16 offset);
192 void (*clear_ep_rxintr)(struct musb *musb, int epnum);
210 u8 epnum; member
453 struct musb_hw_ep *hw_ep, u8 epnum) in musb_read_fifosize() argument
459 reg = musb_readb(mbase, musb->io.ep_offset(epnum, MUSB_FIFOSIZE)); in musb_read_fifosize()
465 musb->epmask |= (1 << epnum); in musb_read_fifosize()
589 static inline void musb_platform_clear_ep_rxintr(struct musb *musb, int epnum) in musb_platform_clear_ep_rxintr() argument
[all …]
Dmediatek.c193 static u32 mtk_musb_busctl_offset(u8 epnum, u16 offset) in mtk_musb_busctl_offset() argument
195 return MTK_MUSB_TXFUNCADDR + offset + 8 * epnum; in mtk_musb_busctl_offset()
306 u8 epnum = qh->hw_ep->epnum; in mtk_musb_get_toggle() local
310 return toggle & (1 << epnum); in mtk_musb_get_toggle()
316 u8 epnum = qh->hw_ep->epnum; in mtk_musb_set_toggle() local
319 toggle = usb_gettoggle(urb->dev, qh->epnum, is_out); in mtk_musb_set_toggle()
323 value |= toggle << epnum; in mtk_musb_set_toggle()
327 value |= toggle << epnum; in mtk_musb_set_toggle()
/Linux-v6.6/drivers/usb/fotg210/
Dfotg210-udc.c45 value |= DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_disable_fifo_int()
47 value |= DMISGR1_MF_OUTSPK_INT(ep->epnum - 1); in fotg210_disable_fifo_int()
56 value &= ~DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_enable_fifo_int()
58 value &= ~DMISGR1_MF_OUTSPK_INT(ep->epnum - 1); in fotg210_enable_fifo_int()
85 if (ep->epnum) { in fotg210_done()
93 static void fotg210_fifo_ep_mapping(struct fotg210_ep *ep, u32 epnum, in fotg210_fifo_ep_mapping() argument
105 val &= ~EPMAP_FIFONOMSK(epnum, dir_in); in fotg210_fifo_ep_mapping()
106 val |= EPMAP_FIFONO(epnum, dir_in); in fotg210_fifo_ep_mapping()
111 val &= ~FIFOMAP_EPNOMSK(epnum); in fotg210_fifo_ep_mapping()
112 val |= FIFOMAP_EPNO(epnum); in fotg210_fifo_ep_mapping()
[all …]
/Linux-v6.6/drivers/usb/gadget/udc/bdc/
Dbdc_cmd.c285 int bdc_ep_set_stall(struct bdc *bdc, int epnum) in bdc_ep_set_stall() argument
289 dev_dbg(bdc->dev, "%s epnum=%d\n", __func__, epnum); in bdc_ep_set_stall()
291 cmd_sc |= BDC_SUB_CMD_EP_STL | BDC_CMD_EPN(epnum) | BDC_CMD_EPO; in bdc_ep_set_stall()
297 int bdc_ep_clear_stall(struct bdc *bdc, int epnum) in bdc_ep_clear_stall() argument
303 dev_dbg(bdc->dev, "%s: epnum=%d\n", __func__, epnum); in bdc_ep_clear_stall()
304 ep = bdc->bdc_ep_array[epnum]; in bdc_ep_clear_stall()
309 if (epnum != 1) { in bdc_ep_clear_stall()
312 ret = bdc_ep_set_stall(bdc, epnum); in bdc_ep_clear_stall()
318 if (epnum != 1) in bdc_ep_clear_stall()
322 cmd_sc |= BDC_SUB_CMD_EP_RST | BDC_CMD_EPN(epnum) | BDC_CMD_EPO; in bdc_ep_clear_stall()
[all …]
Dbdc_ep.c341 void bdc_notify_xfr(struct bdc *bdc, u32 epnum) in bdc_notify_xfr() argument
343 struct bdc_ep *ep = bdc->bdc_ep_array[epnum]; in bdc_notify_xfr()
345 dev_vdbg(bdc->dev, "%s epnum:%d\n", __func__, epnum); in bdc_notify_xfr()
353 bdc_writel(bdc->regs, BDC_XSFNTF, epnum); in bdc_notify_xfr()
665 req->epnum = ep->ep_num; in ep0_queue()
721 req->epnum = ep->ep_num; in ep_queue()
904 u8 epnum; in bdc_free_ep() local
907 for (epnum = 1; epnum < bdc->num_eps; epnum++) { in bdc_free_ep()
908 ep = bdc->bdc_ep_array[epnum]; in bdc_free_ep()
916 if (epnum != 1) in bdc_free_ep()
[all …]
Dbdc_cmd.h16 int bdc_stop_ep(struct bdc *bdc, int epnum);
17 int bdc_ep_set_stall(struct bdc *bdc, int epnum);
18 int bdc_ep_clear_stall(struct bdc *bdc, int epnum);
/Linux-v6.6/drivers/usb/gadget/udc/
Dfusb300_udc.c58 ep->epnum = info.epnum; in fusb300_ep_setting()
64 if (!ep->epnum) in fusb300_ep_release()
66 ep->epnum = 0; in fusb300_ep_release()
103 u32 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET2(info.epnum)); in fusb300_set_epaddrofs()
107 iowrite32(reg, fusb300->reg + FUSB300_OFFSET_EPSET2(info.epnum)); in fusb300_set_epaddrofs()
114 fusb300_set_fifo_entry(fusb300, info.epnum); in ep_fifo_setting()
115 fusb300_set_start_entry(fusb300, info.epnum); in ep_fifo_setting()
122 u32 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_eptype()
126 iowrite32(reg, fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_eptype()
136 reg = ioread32(fusb300->reg + FUSB300_OFFSET_EPSET1(info.epnum)); in fusb300_set_epdir()
[all …]
Dgoku_udc.h135 #define DATASET_A(epnum) (1<<(2*(epnum))) argument
136 #define DATASET_B(epnum) (2<<(2*(epnum))) argument
137 #define DATASET_AB(epnum) (3<<(2*(epnum))) argument
Dfsl_qe_udc.c145 u8 epnum = ep->epnum; in qe_eprx_stall_change() local
148 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eprx_stall_change()
155 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eprx_stall_change()
162 u8 epnum = ep->epnum; in qe_eptx_stall_change() local
165 tem_usep = in_be16(&udc->usb_regs->usb_usep[epnum]); in qe_eptx_stall_change()
172 out_be16(&udc->usb_regs->usb_usep[epnum], tem_usep); in qe_eptx_stall_change()
188 u8 epnum = ep->epnum; in qe_eprx_nack() local
193 clrsetbits_be16(&udc->usb_regs->usb_usep[epnum], in qe_eprx_nack()
210 clrsetbits_be16(&udc->usb_regs->usb_usep[ep->epnum], in qe_eprx_normal()
229 cpm_command(CPM_USB_STOP_TX | (ep->epnum << CPM_USB_EP_SHIFT), in qe_ep_cmd_stoptx()
[all …]
/Linux-v6.6/drivers/staging/emxx_udc/
Demxx_udc.c56 #define _nbu2ss_zero_len_pkt(udc, epnum) \ argument
57 _nbu2ss_ep_in_end(udc, epnum, 0, 0)
216 if (ep->epnum == 0) in _nbu2ss_ep_init()
219 num = ep->epnum - 1; in _nbu2ss_ep_init()
229 data = 1 << (ep->epnum + 8); in _nbu2ss_ep_init()
254 _nbu2ss_endpoint_toggle_reset(udc, (ep->epnum | ep->direct)); in _nbu2ss_ep_init()
290 if ((ep->epnum == 0) || (udc->vbus_active == 0)) in _nbu2ss_epn_exit()
293 num = ep->epnum - 1; in _nbu2ss_epn_exit()
301 data = 1 << (ep->epnum + 8); in _nbu2ss_epn_exit()
339 if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0)) in _nbu2ss_ep_dma_init()
[all …]
/Linux-v6.6/drivers/usb/usbip/
Dstub_rx.c332 int epnum = pdu->base.ep; in get_pipe() local
335 if (epnum < 0 || epnum > 15) in get_pipe()
339 ep = udev->ep_in[epnum & 0x7f]; in get_pipe()
341 ep = udev->ep_out[epnum & 0x7f]; in get_pipe()
349 return usb_sndctrlpipe(udev, epnum); in get_pipe()
351 return usb_rcvctrlpipe(udev, epnum); in get_pipe()
356 return usb_sndbulkpipe(udev, epnum); in get_pipe()
358 return usb_rcvbulkpipe(udev, epnum); in get_pipe()
363 return usb_sndintpipe(udev, epnum); in get_pipe()
365 return usb_rcvintpipe(udev, epnum); in get_pipe()
[all …]
/Linux-v6.6/drivers/usb/dwc3/
Ddebug.h260 u8 epnum = event->endpoint_number; in dwc3_ep_event_string() local
264 len = scnprintf(str, size, "ep%d%s: ", epnum >> 1, in dwc3_ep_event_string()
265 (epnum & 1) ? "in" : "out"); in dwc3_ep_event_string()
277 if (epnum <= 1) in dwc3_ep_event_string()
297 if (epnum <= 1) { in dwc3_ep_event_string()

1234