Home
last modified time | relevance | path

Searched full:ep0 (Results 1 – 25 of 173) sorted by relevance

1234567

/linux-6.12.1/drivers/usb/gadget/udc/aspeed-vhub/
Dep0.c5 * ep0.c - Endpoint 0 handling
31 struct usb_request *req = &ep->ep0.req.req; in ast_vhub_reply()
36 if (WARN_ON(!ep->ep0.dir_in)) in ast_vhub_reply()
92 memcpy_fromio(&crq, ep->ep0.setup, sizeof(crq)); in ast_vhub_ep0_handle_setup()
100 ep->ep0.state); in ast_vhub_ep0_handle_setup()
112 if (ep->ep0.state != ep0_state_token && in ast_vhub_ep0_handle_setup()
113 ep->ep0.state != ep0_state_stall) { in ast_vhub_ep0_handle_setup()
118 /* Calculate next state for EP0 */ in ast_vhub_ep0_handle_setup()
119 ep->ep0.state = ep0_state_data; in ast_vhub_ep0_handle_setup()
120 ep->ep0.dir_in = !!(crq.bRequestType & USB_DIR_IN); in ast_vhub_ep0_handle_setup()
[all …]
Dvhub.h93 /* HUB EP0 control */
136 * matching corresponding vHub EP0 control bits
215 #define AST_VHUB_EP0_MAX_PACKET 64 /* EP0's max packet size */
243 * mode (or ep0), any >= 0 value means "last packet"
255 /* Current state of an EP0 */
264 * An endpoint, either generic, ep0, actual gadget EP
265 * or internal use vhub EP0. vhub EP1 doesn't have an
274 /* EP index in the device, 0 means this is an EP0 */
277 /* Dev pointer or NULL for vHub EP0 */
284 * DMA buffer for EP0, fallback DMA buffer for misaligned
[all …]
Dcore.c50 * If this isn't an internal EP0 request, call the core in ast_vhub_done()
139 /* Handle top-level vHub EP0 interrupts */ in ast_vhub_irq()
144 ast_vhub_ep0_handle_ack(&vhub->ep0, true); in ast_vhub_irq()
146 ast_vhub_ep0_handle_ack(&vhub->ep0, false); in ast_vhub_irq()
148 ast_vhub_ep0_handle_setup(&vhub->ep0); in ast_vhub_irq()
225 /* Default settings for EP0, enable HW hub EP1 */ in ast_vhub_init_hw()
232 /* Configure EP0 DMA buffer */ in ast_vhub_init_hw()
233 writel(vhub->ep0.buf_dma, vhub->regs + AST_VHUB_EP0_DATA); in ast_vhub_init_hw()
382 dev_err(&pdev->dev, "Failed to allocate EP0 DMA buffers\n"); in ast_vhub_probe()
386 UDCVDBG(vhub, "EP0 DMA buffers @%p (DMA 0x%08x)\n", in ast_vhub_probe()
[all …]
Ddev.c38 ast_vhub_ep0_handle_ack(&d->ep0, true); in ast_vhub_dev_irq()
40 ast_vhub_ep0_handle_ack(&d->ep0, false); in ast_vhub_dev_irq()
42 ast_vhub_ep0_handle_setup(&d->ep0); in ast_vhub_dev_irq()
52 /* Cleanup EP0 state */ in ast_vhub_dev_enable()
55 /* Enable device and its EP0 interrupts */ in ast_vhub_dev_enable()
70 /* Set EP0 DMA buffer address */ in ast_vhub_dev_enable()
71 writel(d->ep0.buf_dma, d->regs + AST_VHUB_DEV_EP0_DATA); in ast_vhub_dev_enable()
177 return ast_vhub_simple_reply(&d->ep0, st0, 0); in ast_vhub_dev_status()
202 return ast_vhub_simple_reply(&d->ep0, st0, 0); in ast_vhub_ep_status()
391 /* Only EP0 can be a control endpoint */ in ast_vhub_udc_match_ep()
[all …]
/linux-6.12.1/drivers/usb/gadget/udc/
Drenesas_usbf.c75 /* EP0 registers offsets from Base + USBF_BASE_EP0 (EP0 regs area) */
313 /* for EP0 control messages */
344 /* ep0: buf @0x0000 64 bytes, fixed 32 words */
345 [0] = USBF_EP_INFO("ep0-ctrl",
547 static void usbf_ep0_send_null(struct usbf_ep *ep0, bool is_data1) in usbf_ep0_send_null() argument
555 usbf_ep_reg_bitset(ep0, USBF_REG_EP0_CONTROL, set); in usbf_ep0_send_null()
558 static int usbf_ep0_pio_in(struct usbf_ep *ep0, struct usbf_req *req) in usbf_ep0_pio_in() argument
571 dev_dbg(ep0->udc->dev, "ep0 send null\n"); in usbf_ep0_pio_in()
572 usbf_ep0_send_null(ep0, false); in usbf_ep0_pio_in()
576 if ((req->req.actual % ep0->ep.maxpacket) == 0) { in usbf_ep0_pio_in()
[all …]
Dudc-xilinx.c28 #define XUSB_EP0_CONFIG_OFFSET 0x0000 /* EP0 Config Reg Offset */
202 static const char ep0name[] = "ep0";
261 struct xusb_ep *ep0 = &udc->ep[XUSB_EP_NUMBER_ZERO]; in xudc_wrstatus() local
264 epcfgreg = udc->read_fn(udc->addr + ep0->offset)| in xudc_wrstatus()
266 udc->write_fn(udc->addr, ep0->offset, epcfgreg); in xudc_wrstatus()
267 udc->write_fn(udc->addr, ep0->offset + XUSB_EP_BUF0COUNT_OFFSET, 0); in xudc_wrstatus()
996 * @ep0: pointer to the xusb endpoint 0 structure.
1001 static int __xudc_ep0_queue(struct xusb_ep *ep0, struct xusb_req *req) in __xudc_ep0_queue() argument
1003 struct xusb_udc *udc = ep0->udc; in __xudc_ep0_queue()
1011 if (!list_empty(&ep0->queue)) { in __xudc_ep0_queue()
[all …]
Dlpc32xx_udc.c76 /* EP0 states */
1027 /* Disable all device interrupts (including EP0) */ in udc_disable()
1073 /* Only enable EP0 in and out for now, EP0 only works in FIFO mode */ in udc_enable()
1199 * as EP0) that don't use DMA. This function should only be called if a packet
1304 * as EP0) that don't use DMA. Note that the endpoint must be selected in the
1330 /* USB device reset - resets USB to a default state with just EP0
1335 /* Re-init device controller and EP0 */ in uda_usb_reset()
1345 /* Send a ZLP on EP0 */
1381 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit()
1443 struct lpc32xx_ep *ep0 = &udc->ep[0]; in udc_ep0_in_req() local
[all …]
Dfsl_usb2_udc.h104 /* ep0 transfer state */
300 #define EPCTRL_TX_DATA_TOGGLE_RST 0x00400000 /* Not EP0 */
301 #define EPCTRL_TX_DATA_TOGGLE_INH 0x00200000 /* Not EP0 */
303 #define EPCTRL_TX_DATA_SOURCE 0x00020000 /* Not EP0 */
306 #define EPCTRL_RX_DATA_TOGGLE_RST 0x00000040 /* Not EP0 */
307 #define EPCTRL_RX_DATA_TOGGLE_INH 0x00000020 /* Not EP0 */
309 #define EPCTRL_RX_DATA_SINK 0x00000002 /* Not EP0 */
492 struct fsl_req *status_req; /* ep0 status request */
536 /* we only have one ep0 structure but two queue heads */ in get_qh_by_ep()
Dbcm63xx_udc.c42 static const char bcm63xx_ep0name[] = "ep0";
189 * @ep_num: USB endpoint number. -1 for ep0 RX.
193 * @bep: Pointer to the associated endpoint. NULL for ep0 RX.
203 * ep0 has two IUDMA channels (IUDMA_EP0_RXCHAN and IUDMA_EP0_TXCHAN), as it is
204 * bidirectional. The "struct usb_ep" associated with ep0 is for TX (IN)
274 * @bep: Array of endpoints, including ep0.
279 * @ep0_ctrl_req: Request object for bcm63xx_udc-initiated ep0 transactions.
281 * @ep0state: Current state of the ep0 state machine.
282 * @ep0_wq: Workqueue struct used to wake up the ep0 state machine.
287 * @ep0_req_shutdown: Driver is shutting down; requesting ep0 to halt activity.
[all …]
Dat91_udc.c69 EP_INFO("ep0",
278 /* ep0 is always ready; other endpoints need a non-empty queue */ in done()
672 PACKET("ep0 in/status\n"); in at91_ep_queue()
831 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit()
1266 PACKET("ep0 in/status\n"); in handle_setup()
1275 struct at91_ep *ep0 = &udc->ep[0]; in handle_ep0() local
1276 u32 __iomem *creg = ep0->creg; in handle_ep0()
1281 nuke(ep0, -EPROTO); in handle_ep0()
1286 VDBG("ep0 stalled\n"); in handle_ep0()
1290 nuke(ep0, 0); in handle_ep0()
[all …]
/linux-6.12.1/tools/usb/ffs-aio-example/simple/device_app/
Daio_simple.c182 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
188 pfds[0].fd = ep0; in handle_ep0()
194 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
196 perror("unable to read event from ep0"); in handle_ep0()
203 write(ep0, NULL, 0); in handle_ep0()
205 read(ep0, NULL, 0); in handle_ep0()
227 int ep0; in main() local
252 sprintf(ep_path, "%s/ep0", argv[1]); in main()
253 ep0 = open(ep_path, O_RDWR); in main()
254 if (ep0 < 0) { in main()
[all …]
/linux-6.12.1/tools/usb/ffs-aio-example/multibuff/device_app/
Daio_multibuff.c176 static void handle_ep0(int ep0, bool *ready) in handle_ep0() argument
181 ret = read(ep0, &event, sizeof(event)); in handle_ep0()
183 perror("unable to read event from ep0"); in handle_ep0()
190 write(ep0, NULL, 0); in handle_ep0()
192 read(ep0, NULL, 0); in handle_ep0()
240 int ep0, ep1; in main() local
263 sprintf(ep_path, "%s/ep0", argv[1]); in main()
264 ep0 = open(ep_path, O_RDWR); in main()
265 if (ep0 < 0) { in main()
266 perror("unable to open ep0"); in main()
[all …]
/linux-6.12.1/drivers/usb/gadget/function/
Du_fs.h96 * are refused. All epfiles, except ep0, are deleted so there
102 * ep0 is opened again. In the second case functionfs state will
120 * In this state no open(2), read(2) or write(2) (both on ep0
122 * unlinked and all closed so this is not a problem; ep0 is
123 * also closed but ep0 file exists and so open(2) on ep0 must
134 * there. The next read/write on ep0 will handle the
141 * setup. If this state is set read/write on ep0 return
178 /* how many files are opened (EP0 and others) */
181 /* EP0 state */
187 * happens only in ep0 read which is P: mutex
[all …]
/linux-6.12.1/drivers/usb/mtu3/
Dmtu3_gadget_ep0.c3 * mtu3_gadget_ep0.c - MediaTek USB3 DRD peripheral driver ep0 handling
17 /* ep0 is always mtu3->in_eps[0] */
18 #define next_ep0_request(mtu) next_request((mtu)->ep0)
59 mtu3_req_complete(mtu->ep0, req, 0); in ep0_req_giveback()
123 * because the length of test packet is less than max packet of HS ep0, in ep0_load_test_packet()
126 ep0_write_fifo(mtu->ep0, mtu3_test_packet, sizeof(mtu3_test_packet)); in ep0_load_test_packet()
152 dev_dbg(mtu->dev, "ep0: %s STALL, ep0_state: %s\n", in ep0_stall_set()
196 mtu->ep0_req.mep = mtu->ep0; in ep0_set_sel()
200 ret = ep0_queue(mtu->ep0, &mtu->ep0_req); in ep0_set_sel()
265 mtu->ep0_req.mep = mtu->ep0; in ep0_get_status()
[all …]
Dmtu3_core.c180 /* Clear EP0 and Tx/Rx EPn interrupts status */ in mtu3_intr_status_clear()
307 /* set/clear the stall and toggle bits for non-ep0 */
403 /* for non-ep0 */
505 /* for non-ep0 */
531 * 1. when device IP supports SS, the fifo of EP0, TX EPs, RX EPs
535 * the total fifo size of non-ep0, and ep0's is fixed to 64B,
537 * Due to the first 64B should be reserved for EP0, non-ep0's fifo
582 u32 maxpacket = mtu->g.ep0->maxpacket; in mtu3_ep0_setup()
593 /* Enable EP0 interrupt */ in mtu3_ep0_setup()
614 /* one for ep0, another is reserved */ in mtu3_mem_alloc()
[all …]
/linux-6.12.1/include/uapi/linux/usb/
Dgadgetfs.h5 * Other than ep0 operations, most things are done by read() and write()
8 * i/o requests. When ep0 is configured, the device can enumerate;
10 * ep0 require ioctl() operations.
28 * Events are delivered on the ep0 file descriptor, when the user mode driver
/linux-6.12.1/drivers/usb/gadget/legacy/
Dinode.c51 * are two types of files. One type is for the device, implementing ep0.
89 /* /dev/gadget/$CHIP represents ep0 and the whole device */
95 * ep0/device i/o modes and binding to the controller. Driver
101 /* From then on, ep0 fd is in either of two basic modes:
110 /* UNBOUND means the driver closed ep0, so the device won't be
131 /* drivers reading ep0 MUST handle control requests (SETUP)
154 /* except this scratch i/o buffer for ep0 */
243 * at the end of ep0 configuration, or after unbind.
845 /* EP0 IMPLEMENTATION can be partly in userspace.
898 DBG (dev, "ep0 request busy!\n"); in setup_req()
[all …]
/linux-6.12.1/drivers/usb/gadget/udc/bdc/
Dbdc_ep.c383 /* Setup the first bd for ep0 transfer */
400 (req_len % bdc->gadget.ep0->maxpacket == 0)) { in setup_first_bd_ep0()
403 bdc->gadget.ep0->maxpacket); in setup_first_bd_ep0()
416 "Unknown ep0 state for queueing bd ep0_state:%s\n", in setup_first_bd_ep0()
455 /* format of first bd for ep0 is different than other */ in setup_bd_list_xfr()
587 /* ep0 memory is not freed, but reused on next connect sr */ in bdc_ep_disable()
617 /* only for ep0: config ep is called for ep0 from connect event */ in bdc_ep_enable()
635 /* EP0 related code */
655 /* Queue xfr on ep0 */
915 /* ep0 is not in this gadget list */ in bdc_free_ep()
[all …]
Dbdc_udc.c50 /* EP0 initial descripror */
86 bdc->gadget.ep0->maxpacket = EP0_MAX_PKT_SIZE; in bdc_uspc_connected()
98 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
104 bdc->gadget.ep0->maxpacket = 64; in bdc_uspc_connected()
110 bdc->gadget.ep0->maxpacket = 8; in bdc_uspc_connected()
118 /* Now we know the speed, configure ep0 */ in bdc_uspc_connected()
122 dev_err(bdc->dev, "EP0 config failed\n"); in bdc_uspc_connected()
135 * Only stop ep0 from here, rest of the endpoints will be disabled in bdc_uspc_disconnected()
556 * Allocate bd list for ep0 only, ep0 will be enabled on connect in bdc_udc_init()
/linux-6.12.1/drivers/usb/musb/
Dmusb_regs.h113 #define MUSB_TYPE_PROTO 0x30 /* Implicitly zero for ep0 */
115 #define MUSB_TYPE_REMOTE_END 0xf /* Implicitly zero for ep0 */
249 #define MUSB_CSR0 MUSB_TXCSR /* Re-used for EP0 */
253 #define MUSB_COUNT0 MUSB_RXCOUNT /* Re-used for EP0 */
255 #define MUSB_TYPE0 MUSB_TXTYPE /* Re-used for EP0 */
257 #define MUSB_NAKLIMIT0 MUSB_TXINTERVAL /* Re-used for EP0 */
261 #define MUSB_CONFIGDATA MUSB_FIFOSIZE /* Re-used for EP0 */
/linux-6.12.1/Documentation/driver-api/cxl/
Daccess-coordinates.rst42 > EP0 EP1 EP2 EP3 EP4 EP5 EP6 EP7
48 Min(SW0SSLBIS for SW0DSP0 (EP0), EP0 DSLBIS, EP0 Upstream Link) +
/linux-6.12.1/Documentation/usb/
Dfunctionfs.rst19 mounted provides an "ep0" file. User space driver need to
35 configuration changes to (say) endpoint 2)). "ep0" is used
70 have been written to their ep0's.
87 IOCTLs have to be performed on a data endpoint (ie. not ep0). They are:
/linux-6.12.1/drivers/usb/dwc3/
Dep0.c3 * ep0.c - DesignWare USB3 DRD Controller Endpoint 0 Handling
209 /* we share one TRB for ep0/1 */ in dwc3_gadget_ep0_queue()
232 /* stall is always issued on EP0 */ in dwc3_ep0_stall_and_restart()
865 struct dwc3_ep *ep0; in dwc3_ep0_complete_data() local
872 ep0 = dwc->eps[0]; in dwc3_ep0_complete_data()
876 trace_dwc3_complete_trb(ep0, trb); in dwc3_ep0_complete_data()
878 r = next_request(&ep0->pending_list); in dwc3_ep0_complete_data()
886 dwc3_gadget_giveback(ep0, r, -ECONNRESET); in dwc3_ep0_complete_data()
897 if ((IS_ALIGNED(ur->length, ep0->endpoint.maxpacket) && in dwc3_ep0_complete_data()
901 trace_dwc3_complete_trb(ep0, trb); in dwc3_ep0_complete_data()
[all …]
/linux-6.12.1/drivers/usb/dwc2/
Dcore.h54 * be transferred by IN transactions on EP0. This is either 127 bytes or 3
63 * If we try to lower the MPS size for EP0, then no transfers work properly
64 * for EP0, and the system will fail basic enumeration. As no cause for this
66 * EP0.
103 * @fifo_index: For Dedicated FIFO operation, only FIFO0 can be used for EP0.
199 /* Gadget ep0 states */
664 /* Size of control and EP0 buffers */
1005 * @num_of_eps: Number of available EPs (excluding EP0)
1007 * @ep0_reply: Request used for ep0 reply.
1008 * @ep0_buff: Buffer for EP0 reply data, if needed.
[all …]
/linux-6.12.1/drivers/usb/usbip/
Dvudc_sysfs.c26 struct vep *ep0 = to_vep(udc->gadget.ep0); in get_gadget_descs() local
47 usb_req = list_last_entry(&ep0->req_queue, struct vrequest, req_entry); in get_gadget_descs()
61 usb_gadget_giveback_request(&(ep0->ep), &(usb_req->req)); in get_gadget_descs()

1234567