/* Handle RX transaction on non-ISO endpoint. The ep argument is a physical endpoint number for a non-ISO IN endpoint in the range 1 to 15.  */
static void spear_udc_epn_rx(int ep)
/* Handle RX transaction on non-ISO endpoint. The ep argument is a physical endpoint number for a non-ISO IN endpoint in the range 1 to 15.  */
static void spear_udc_epn_rx(int ep)
{
	int nbytes = 0;
	struct urb *urb;
	struct usb_endpoint_instance *endpoint = spear_find_ep(ep);
	if (endpoint) {
		urb = endpoint->rcv_urb;
		if (urb) {
			u8 *cp = urb->buffer + urb->actual_length;
			nbytes = (readl(&outep_regs_p[ep].endp_status) >> 11) &
			    0xfff;
			usbgetpckfromfifo(ep, cp, nbytes);
			usbd_rcv_complete(endpoint, nbytes, 0);
		}
	}
}