Home
last modified time | relevance | path

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

1234

/linux/drivers/usb/gadget/udc/aspeed-vhub/
H A 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()
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 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.c144 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()
233 writel(vhub->ep0.buf_dma, vhub->regs + AST_VHUB_EP0_DATA); in ast_vhub_init_hw()
390 ast_vhub_init_ep0(vhub, &vhub->ep0, NULL); in ast_vhub_probe()
H A DMakefile3 aspeed-vhub-y := core.o ep0.o epn.o dev.o hub.o
H A Dvhub.h243 * mode (or ep0), any >= 0 value means "last packet"
264 * An endpoint, either generic, ep0, actual gadget EP
308 } ep0; member
360 struct ast_vhub_ep ep0; member
397 struct ast_vhub_ep ep0; member
524 /* ep0.c */
/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()
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 < 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()
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/drivers/usb/gadget/udc/
H A Drenesas_usbf.c344 /* 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()
578 dev_dbg(ep0 in usbf_ep0_pio_in()
617 usbf_ep0_pio_out(struct usbf_ep * ep0,struct usbf_req * req) usbf_ep0_pio_out() argument
704 usbf_ep0_fifo_flush(struct usbf_ep * ep0) usbf_ep0_fifo_flush() argument
1785 usbf_ep0_enable(struct usbf_ep * ep0) usbf_ep0_enable() argument
1916 usbf_ep0_queue(struct usbf_ep * ep0,struct usbf_req * req,gfp_t gfp_flags) usbf_ep0_queue() argument
2176 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
2444 usbf_handle_ep0_setup(struct usbf_ep * ep0) usbf_handle_ep0_setup() argument
2520 usbf_handle_ep0_data_status(struct usbf_ep * ep0,const char * ep0state_name,enum usbf_ep0state next_ep0state) usbf_handle_ep0_data_status() argument
2551 usbf_handle_ep0_out_status_start(struct usbf_ep * ep0) usbf_handle_ep0_out_status_start() argument
2576 usbf_handle_ep0_in_status_start(struct usbf_ep * ep0) usbf_handle_ep0_in_status_start() argument
2622 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 Dat91_udc.c70 EP_INFO("ep0",
279 /* ep0 is always ready; other endpoints need a non-empty queue */ in done()
673 PACKET("ep0 in/status\n"); in at91_ep_queue()
832 INIT_LIST_HEAD(&udc->gadget.ep0->ep_list); in udc_reinit()
1267 PACKET("ep0 in/status\n"); in handle_setup()
1276 struct at91_ep *ep0 = &udc->ep[0]; in handle_ep0() local
1277 u32 __iomem *creg = ep0->creg; in handle_ep0()
1282 nuke(ep0, -EPROTO); in handle_ep0()
1287 VDBG("ep0 stalled\n"); in handle_ep0()
1291 nuke(ep0, in handle_ep0()
[all...]
H A Dtegra-xudc.c2507 struct tegra_xudc_ep *ep0 = &xudc->ep[0]; in tegra_xudc_ep0_set_address() local
2529 ep_ctx_write_devaddr(ep0->context, addr); in tegra_xudc_ep0_set_address()
2809 struct tegra_xudc_ep *ep0 = &xudc->ep[0]; in tegra_xudc_reset() local
2826 ep0->deq_ptr = ep0->enq_ptr; in tegra_xudc_reset()
2827 ep0->ring_full = false; in tegra_xudc_reset()
2832 ep_ctx_write_rsvd(ep0->context, 0); in tegra_xudc_reset()
2833 ep_ctx_write_partial_td(ep0->context, 0); in tegra_xudc_reset()
2834 ep_ctx_write_splitxstate(ep0->context, 0); in tegra_xudc_reset()
2835 ep_ctx_write_seq_num(ep0 in tegra_xudc_reset()
2851 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.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...]
/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()
H A Dfhci-sched.c36 cq_put(&usb->ep0->empty_frame_Q, pkt); in recycle_frame()
56 cq_put(&usb->ep0->dummy_packets_Q, pkt->data); in fhci_transaction_confirm()
212 pkt = cq_get(&usb->ep0->empty_frame_Q); in add_packet()
221 data = cq_get(&usb->ep0->dummy_packets_Q); in add_packet()
245 cq_put(&usb->ep0->dummy_packets_Q, pkt->data); in add_packet()
319 fhci_push_dummy_bd(usb->ep0); in scan_ed_list()
516 fhci_push_dummy_bd(usb->ep0); in fhci_frame_limit_timer_irq()
/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/cdns3/
H A DMakefile18 cdns3-$(CONFIG_USB_CDNS3_GADGET) += cdns3-gadget.o cdns3-ep0.o
40 cdnsp-mem.o cdnsp-ep0.o
/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)
155 /* except this scratch i/o buffer for ep0 */
244 * at the end of ep0 configuration, or after unbind.
899 DBG (dev, "ep0 request busy!\n"); in setup_req()
939 (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/Documentation/usb/
H A 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/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()
2271 composite_setup_complete(gadget->ep0, req); in composite_setup()
2412 cdev->req = usb_ep_alloc_request(gadget->ep0, GFP_KERNEL); in composite_dev_prepare()
2426 gadget->ep0 in composite_dev_prepare()
2453 composite_os_desc_req_prepare(struct usb_composite_dev * cdev,struct usb_ep * ep0) composite_os_desc_req_prepare() argument
[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()
556 * 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

1234