Lines Matching refs:endpoint
260 *endpoint) in dw_write_noniso_tx_fifo()
262 struct urb *urb = endpoint->tx_urb; in dw_write_noniso_tx_fifo()
271 last = min_t(u32, urb->actual_length - endpoint->sent, in dw_write_noniso_tx_fifo()
272 endpoint->tx_packetSize); in dw_write_noniso_tx_fifo()
275 u8 *cp = urb->buffer + endpoint->sent; in dw_write_noniso_tx_fifo()
290 endpoint->sent, endpoint->tx_packetSize, last); in dw_write_noniso_tx_fifo()
292 usbputpcktofifo(endpoint->endpoint_address & in dw_write_noniso_tx_fifo()
295 endpoint->last = last; in dw_write_noniso_tx_fifo()
303 static void dw_udc_setup(struct usb_endpoint_instance *endpoint) in dw_udc_setup() argument
306 int ep_addr = endpoint->endpoint_address; in dw_udc_setup()
337 endpoint->tx_urb = ep0_urb; in dw_udc_setup()
338 endpoint->sent = 0; in dw_udc_setup()
344 dw_write_noniso_tx_fifo(endpoint); in dw_udc_setup()
349 udc_unset_nak(endpoint->endpoint_address); in dw_udc_setup()
357 static void dw_udc_ep0_rx(struct usb_endpoint_instance *endpoint) in dw_udc_ep0_rx() argument
391 static void dw_udc_ep0_tx(struct usb_endpoint_instance *endpoint) in dw_udc_ep0_tx() argument
417 endpoint->sent += endpoint->last; in dw_udc_ep0_tx()
428 if ((endpoint->sent == ep0_urb->actual_length) && in dw_udc_ep0_tx()
430 (endpoint->last != endpoint->tx_packetSize))) { in dw_udc_ep0_tx()
440 dw_write_noniso_tx_fifo(endpoint); in dw_udc_ep0_tx()
442 ep_addr = endpoint->endpoint_address; in dw_udc_ep0_tx()
469 struct usb_endpoint_instance *endpoint = dw_find_ep(ep); in dw_udc_epn_rx() local
471 if (endpoint) { in dw_udc_epn_rx()
472 urb = endpoint->rcv_urb; in dw_udc_epn_rx()
480 usbd_rcv_complete(endpoint, nbytes, 0); in dw_udc_epn_rx()
492 struct usb_endpoint_instance *endpoint = dw_find_ep(ep); in dw_udc_epn_tx() local
494 if (!endpoint) in dw_udc_epn_tx()
502 if (endpoint->tx_urb && in dw_udc_epn_tx()
503 (endpoint->last == endpoint->tx_packetSize) && in dw_udc_epn_tx()
504 (endpoint->tx_urb->actual_length - endpoint->sent - in dw_udc_epn_tx()
505 endpoint->last == 0)) { in dw_udc_epn_tx()
511 if (endpoint->tx_urb && endpoint->tx_urb->actual_length) { in dw_udc_epn_tx()
513 usbd_tx_complete(endpoint); in dw_udc_epn_tx()
518 if (endpoint->tx_urb && endpoint->tx_urb->actual_length) { in dw_udc_epn_tx()
520 dw_write_noniso_tx_fifo(endpoint); in dw_udc_epn_tx()
523 } else if (endpoint->tx_urb in dw_udc_epn_tx()
524 && (endpoint->tx_urb->actual_length == 0)) { in dw_udc_epn_tx()
535 int udc_endpoint_write(struct usb_endpoint_instance *endpoint) in udc_endpoint_write() argument
537 udc_unset_nak(endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK); in udc_endpoint_write()
589 u32 ep, struct usb_endpoint_instance *endpoint) in udc_setup_ep() argument
591 UDCDBGA("setting up endpoint addr %x", endpoint->endpoint_address); in udc_setup_ep()
607 ep_addr = endpoint->endpoint_address; in udc_setup_ep()
612 packet_size = endpoint->tx_packetSize; in udc_setup_ep()
614 attributes = endpoint->tx_attributes; in udc_setup_ep()
617 packet_size = endpoint->rcv_packetSize; in udc_setup_ep()
619 attributes = endpoint->rcv_attributes; in udc_setup_ep()