/* Handle TX transaction on non-ISO endpoint. The ep argument is a physical endpoint number for a non-ISO IN endpoint in the range 16 to 30.  */
static void dw_udc_epn_tx(int ep)
/* Handle TX transaction on non-ISO endpoint. The ep argument is a physical endpoint number for a non-ISO IN endpoint in the range 16 to 30.  */
static void dw_udc_epn_tx(int ep)
{
	struct usb_endpoint_instance *endpoint = dw_find_ep(ep);
	if (!endpoint)
		return;
	if (endpoint->tx_urb &&
	    (endpoint->last == endpoint->tx_packetSize) &&
	    (endpoint->tx_urb->actual_length - endpoint->sent -
	     endpoint->last == 0)) {
		writel(0x0, &inep_regs_p[ep].write_done);
	}
	if (endpoint->tx_urb && endpoint->tx_urb->actual_length) {
		usbd_tx_complete(endpoint);
		if (endpoint->tx_urb && endpoint->tx_urb->actual_length) {
			dw_write_noniso_tx_fifo(endpoint);
			writel(0x0, &inep_regs_p[ep].write_done);
		} else if (endpoint->tx_urb
			   && (endpoint->tx_urb->actual_length == 0)) {
		}
	}
}