Home
last modified time | relevance | path

Searched refs:ep0 (Results 1 – 25 of 66) sorted by relevance

123

/linux/drivers/usb/gadget/udc/aspeed-vhub/
H A Dep0.c31 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()
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()
163 writel(VHUB_EP0_CTRL_STALL, ep->ep0.ctlstat); in ast_vhub_ep0_handle_setup()
164 ep->ep0.state = ep0_state_stall; in ast_vhub_ep0_handle_setup()
[all …]
H A 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()
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()
556 ast_vhub_init_ep0(vhub, &d->ep0, d); in ast_vhub_init_dev()
588 d->gadget.ep0 = &d->ep0.ep; in ast_vhub_init_dev()
H A Dcore.c145 ast_vhub_ep0_handle_ack(&vhub->ep0, true); in ast_vhub_irq()
147 ast_vhub_ep0_handle_ack(&vhub->ep0, false); in ast_vhub_irq()
149 ast_vhub_ep0_handle_setup(&vhub->ep0); in ast_vhub_irq()
234 writel(vhub->ep0.buf_dma, vhub->regs + AST_VHUB_EP0_DATA); in ast_vhub_init_hw()
411 ast_vhub_init_ep0(vhub, &vhub->ep0, NULL); in ast_vhub_probe()
H A Dvhub.h308 } ep0; member
360 struct ast_vhub_ep ep0; member
398 struct ast_vhub_ep ep0; member
H A DMakefile3 aspeed-vhub-y := core.o ep0.o epn.o dev.o hub.o
/linux/tools/usb/ffs-aio-example/simple/device_app/
H A 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()
203 write(ep0, NULL, 0); in handle_ep0()
205 read(ep0, NULL, 0); in handle_ep0()
227 int ep0; in main() local
253 ep0 = open(ep_path, O_RDWR); in main()
254 if (ep0 < 0) { in main()
258 if (write(ep0, &descriptors, sizeof(descriptors)) < 0) { in main()
262 if (write(ep0, &strings, sizeof(strings)) < 0) { in main()
[all …]
/linux/tools/usb/ffs-aio-example/multibuff/device_app/
H A 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()
190 write(ep0, NULL, 0); in handle_ep0()
192 read(ep0, NULL, 0); in handle_ep0()
240 int ep0, ep1; in main() local
264 ep0 = open(ep_path, O_RDWR); in main()
265 if (ep0 < 0) { in main()
269 if (write(ep0, &descriptors, sizeof(descriptors)) < 0) { in main()
273 if (write(ep0, &strings, sizeof(strings)) < 0) { in main()
304 FD_SET(ep0, &rfds); in main()
[all …]
/linux/drivers/usb/gadget/udc/
H A Drenesas_usbf.c343 /* ep0: buf @0x0000 64 bytes, fixed 32 words */
344 [0] = USBF_EP_INFO("ep0-ctrl",
546 static void usbf_ep0_send_null(struct usbf_ep *ep0, bool is_data1) in usbf_ep0_send_null() argument
554 usbf_ep_reg_bitset(ep0, USBF_REG_EP0_CONTROL, set); in usbf_ep0_send_null()
557 static int usbf_ep0_pio_in(struct usbf_ep *ep0, struct usbf_req *req) in usbf_ep0_pio_in() argument
570 dev_dbg(ep0->udc->dev, "ep0 send null\n"); in usbf_ep0_pio_in()
571 usbf_ep0_send_null(ep0, false); in usbf_ep0_pio_in()
575 if ((req->req.actual % ep0->ep.maxpacket) == 0) { in usbf_ep0_pio_in()
577 dev_dbg(ep0 in usbf_ep0_pio_in()
616 usbf_ep0_pio_out(struct usbf_ep * ep0,struct usbf_req * req) usbf_ep0_pio_out() argument
703 usbf_ep0_fifo_flush(struct usbf_ep * ep0) usbf_ep0_fifo_flush() argument
1784 usbf_ep0_enable(struct usbf_ep * ep0) usbf_ep0_enable() argument
1915 usbf_ep0_queue(struct usbf_ep * ep0,struct usbf_req * req,gfp_t gfp_flags) usbf_ep0_queue() argument
2175 usbf_ep0_fill_req(struct usbf_ep * ep0,struct usbf_req * req,void * buf,unsigned int length,void (* complete)(struct usb_ep * _ep,struct usb_request * _req)) usbf_ep0_fill_req() argument
2443 usbf_handle_ep0_setup(struct usbf_ep * ep0) usbf_handle_ep0_setup() argument
2519 usbf_handle_ep0_data_status(struct usbf_ep * ep0,const char * ep0state_name,enum usbf_ep0state next_ep0state) usbf_handle_ep0_data_status() argument
2550 usbf_handle_ep0_out_status_start(struct usbf_ep * ep0) usbf_handle_ep0_out_status_start() argument
2575 usbf_handle_ep0_in_status_start(struct usbf_ep * ep0) usbf_handle_ep0_in_status_start() argument
2621 usbf_ep0_interrupt(struct usbf_ep * ep0) usbf_ep0_interrupt() argument
[all...]
H A Dudc-xilinx.c202 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()
1012 dev_dbg(udc->dev, "%s:ep0 bus in __xudc_ep0_queue()
1056 struct xusb_ep *ep0 = to_xusb_ep(_ep); xudc_ep0_queue() local
1378 struct xusb_ep *ep0 = &udc->ep[XUSB_EP_NUMBER_ZERO]; xudc_start() local
1567 struct xusb_ep *ep0 = &udc->ep[XUSB_EP_NUMBER_ZERO]; xudc_ep0_stall() local
1582 struct xusb_ep *ep0 = &udc->ep[0]; xudc_setaddress() local
1603 struct xusb_ep *ep0 = &udc->ep[0]; xudc_getstatus() local
1660 struct xusb_ep *ep0 = &udc->ep[0]; xudc_set_clear_feature() local
1753 struct xusb_ep *ep0 = &udc->ep[0]; xudc_handle_setup() local
1819 struct xusb_ep *ep0 = &udc->ep[0]; xudc_ep0_out() local
1868 struct xusb_ep *ep0 = &udc->ep[0]; xudc_ep0_in() local
[all...]
H A Dlpc32xx_udc.c1381 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
1446 if (list_empty(&ep0->queue)) in udc_ep0_in_req()
1450 req = list_entry(ep0->queue.next, struct lpc32xx_request, in udc_ep0_in_req()
1457 done(ep0, req, 0); in udc_ep0_in_req()
1459 } else if (ts > ep0->ep.maxpacket) in udc_ep0_in_req()
1460 ts = ep0->ep.maxpacket; /* Just send what we can */ in udc_ep0_in_req()
1468 if (tsend >= ep0->ep.maxpacket) in udc_ep0_in_req()
1473 done(ep0, req, 0); in udc_ep0_in_req()
1481 struct lpc32xx_ep *ep0 in udc_ep0_out_req() local
2179 struct lpc32xx_ep *ep, *ep0 = &udc->ep[0]; udc_handle_ep0_setup() local
2318 struct lpc32xx_ep *ep0 = &udc->ep[0]; udc_handle_ep0_in() local
2352 struct lpc32xx_ep *ep0 = &udc->ep[0]; udc_handle_ep0_out() local
[all...]
H A Domap_udc.c1391 struct omap_ep *ep0 = &udc->ep[0]; in ep0_irq() local
1394 ep0->irqs++; in ep0_irq()
1402 nuke(ep0, 0); in ep0_irq()
1417 if (!list_empty(&ep0->queue)) in ep0_irq()
1418 req = container_of(ep0->queue.next, struct omap_req, queue); in ep0_irq()
1433 stat = write_fifo(ep0, req); in ep0_irq()
1446 done(ep0, req, 0); in ep0_irq()
1470 stat = read_fifo(ep0, req); in ep0_irq()
1481 done(ep0, req, 0); in ep0_irq()
1494 done(ep0, req, 0); in ep0_irq()
[all …]
H A Dtegra-xudc.c2505 struct tegra_xudc_ep *ep0 = &xudc->ep[0]; in tegra_xudc_ep0_set_address() local
2527 ep_ctx_write_devaddr(ep0->context, addr); in tegra_xudc_ep0_set_address()
2807 struct tegra_xudc_ep *ep0 = &xudc->ep[0]; in tegra_xudc_reset() local
2824 ep0->deq_ptr = ep0->enq_ptr; in tegra_xudc_reset()
2825 ep0->ring_full = false; in tegra_xudc_reset()
2830 ep_ctx_write_rsvd(ep0->context, 0); in tegra_xudc_reset()
2831 ep_ctx_write_partial_td(ep0->context, 0); in tegra_xudc_reset()
2832 ep_ctx_write_splitxstate(ep0->context, 0); in tegra_xudc_reset()
2833 ep_ctx_write_seq_num(ep0 in tegra_xudc_reset()
2849 struct tegra_xudc_ep *ep0 = &xudc->ep[0]; tegra_xudc_port_connect() local
[all...]
H A Datmel_usba_udc.c240 usba_ep_init_debugfs(udc, to_usba_ep(udc->gadget.ep0)); in usba_init_debugfs()
245 usba_ep_cleanup_debugfs(to_usba_ep(udc->gadget.ep0)); in usba_cleanup_debugfs()
1140 ep = to_usba_ep(udc->gadget.ep0); in reset_all_endpoints()
1152 return to_usba_ep(udc->gadget.ep0); in get_ep_by_addr()
1233 * Test_SE0_NAK: Force high-speed mode and set up ep0 in do_test_mode()
1246 dev_err(dev, "Test_SE0_NAK: ep0 not mapped\n"); in do_test_mode()
1262 dev_err(dev, "Test_Packet: ep0 not mapped\n"); in do_test_mode()
1791 struct usba_ep *ep0, *ep; in usba_udc_irq() local
1814 ep0 = &udc->usba_ep[0]; in usba_udc_irq()
1815 ep0 in usba_udc_irq()
[all...]
/linux/drivers/usb/mtu3/
H A Dmtu3_gadget_ep0.c18 #define next_ep0_request(mtu) next_request((mtu)->ep0)
59 mtu3_req_complete(mtu->ep0, req, 0); in ep0_req_giveback()
126 ep0_write_fifo(mtu->ep0, mtu3_test_packet, sizeof(mtu3_test_packet)); in ep0_load_test_packet()
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()
269 ret = ep0_queue(mtu->ep0, &mtu->ep0_req); in ep0_get_status()
535 ep0_read_fifo(mtu->ep0, buf, count); in ep0_rx_state()
539 maxp = mtu->g.ep0->maxpacket; in ep0_rx_state()
577 maxp = mtu->g.ep0->maxpacket; in ep0_tx_state()
[all …]
/linux/drivers/usb/host/
H A Dfhci-tds.c100 ep = usb->ep0; in fhci_ep0_free()
136 usb->ep0 = NULL; in fhci_ep0_free()
224 usb->ep0 = ep; in fhci_create_ep()
279 struct endpoint *ep = usb->ep0; in fhci_td_transaction_confirm()
385 struct endpoint *ep = usb->ep0; in fhci_host_transaction()
472 struct endpoint *ep = usb->ep0; in fhci_flush_bds()
528 struct endpoint *ep = usb->ep0; in fhci_flush_actual_frame()
592 struct endpoint *ep = usb->ep0; in fhci_host_transmit_actual_frame()
/linux/drivers/usb/usbip/
H A 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()
/linux/drivers/usb/gadget/legacy/
H A Dinode.c52 * are two types of files. One type is for the device, implementing ep0.
90 /* /dev/gadget/$CHIP represents ep0 and the whole device */
96 * ep0/device i/o modes and binding to the controller. Driver
102 /* From then on, ep0 fd is in either of two basic modes:
111 /* UNBOUND means the driver closed ep0, so the device won't be
132 /* drivers reading ep0 MUST handle control requests (SETUP)
154 /* except this scratch i/o buffer for ep0 */
245 * at the end of ep0 configuration, or after unbind.
1027 DBG (dev, "ep0 request busy!\n"); in ep0_read()
1067 (void) usb_ep_set_halt (dev->gadget->ep0); in ep0_read()
[all...]
H A Ddbgp.c226 usb_ep_free_request(gadget->ep0, dbgp.req); in dbgp_unbind()
284 dbgp.req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in dbgp_bind()
367 device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; in dbgp_setup()
401 return usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); in dbgp_setup()
/linux/drivers/usb/gadget/
H A Dcomposite.c261 ERROR(cdev, "ep0 bMaxBurst must be 0\n"); in config_ep_by_speed_and_alt()
921 qual->bMaxPacketSize0 = cdev->gadget->ep0->maxpacket; in device_qual()
1559 * REVIST The same ep0 requests are shared with function drivers in composite_setup_complete()
1583 ret = usb_ep_queue(cdev->gadget->ep0, req, gfp_flags); in composite_ep0_queue()
1747 * The setup() callback implements all the ep0 functionality that's
1788 gadget->ep0->driver_data = cdev; in composite_setup()
1809 cdev->gadget->ep0->maxpacket; in composite_setup()
2275 composite_setup_complete(gadget->ep0, req); in composite_setup()
2416 cdev->req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in composite_dev_prepare()
2430 gadget->ep0 in composite_dev_prepare()
2457 composite_os_desc_req_prepare(struct usb_composite_dev * cdev,struct usb_ep * ep0) composite_os_desc_req_prepare() argument
[all...]
/linux/drivers/usb/dwc3/
H A Dep0.c3 * ep0.c - DesignWare USB3 DRD Controller Endpoint 0 Handling
215 /* we share one TRB for ep0/1 */ in dwc3_gadget_ep0_queue()
302 dev_err(dwc->dev, "ep0 out start transfer failed: %d\n", ret); in dwc3_ep0_out_start()
877 struct dwc3_ep *ep0; in dwc3_ep0_complete_data() local
884 ep0 = dwc->eps[0]; in dwc3_ep0_complete_data()
888 trace_dwc3_complete_trb(ep0, trb); in dwc3_ep0_complete_data()
890 r = next_request(&ep0->pending_list); in dwc3_ep0_complete_data()
898 dwc3_gadget_giveback(ep0, r, -ECONNRESET); in dwc3_ep0_complete_data()
909 if ((IS_ALIGNED(ur->length, ep0->endpoint.maxpacket) && in dwc3_ep0_complete_data()
913 trace_dwc3_complete_trb(ep0, tr in dwc3_ep0_complete_data()
[all...]
/linux/drivers/usb/gadget/udc/cdns2/
H A DMakefile6 cdns2-udc-pci-$(CONFIG_USB_CDNS2_UDC) += cdns2-pci.o cdns2-gadget.o cdns2-ep0.o
/linux/drivers/usb/gadget/udc/bdc/
H A Dbdc_udc.c86 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()
135 * Only stop ep0 from here, rest of the endpoints will be disabled in bdc_uspc_disconnected()
557 * Allocate bd list for ep0 only, ep0 will be enabled on connect in bdc_udc_init()
/linux/Documentation/ABI/testing/
H A Dconfigfs-usb-gadget-ffs13 strings to ep0, so the gadget can be
/linux/drivers/usb/core/
H A Dusb.c678 INIT_LIST_HEAD(&dev->ep0.urb_list); in usb_alloc_dev()
679 dev->ep0.desc.bLength = USB_DT_ENDPOINT_SIZE; in usb_alloc_dev()
680 dev->ep0.desc.bDescriptorType = USB_DT_ENDPOINT; in usb_alloc_dev()
681 /* ep0 maxpacket comes later, from device descriptor */ in usb_alloc_dev()
682 usb_enable_endpoint(dev, &dev->ep0, false); in usb_alloc_dev()
/linux/Documentation/usb/
H A Dfunctionfs-desc.rst10 Descriptors are written to the "ep0" file in the FFS gadget

123