/* The endpoint to prepare for transfer is specified as a physical endpoint number. For OUT (rx) endpoints 1 through 15, the corresponding endpoint configuration register is checked to see if the endpoint is ISO or not. If the OUT endpoint is valid and is non-ISO then its FIFO is enabled. No action is taken for endpoint 0 or for IN (tx) endpoints 16 through 30.  */
static void omap1510_prepare_endpoint_for_rx(int ep_addr)
/* The endpoint to prepare for transfer is specified as a physical endpoint number. For OUT (rx) endpoints 1 through 15, the corresponding endpoint configuration register is checked to see if the endpoint is ISO or not. If the OUT endpoint is valid and is non-ISO then its FIFO is enabled. No action is taken for endpoint 0 or for IN (tx) endpoints 16 through 30.  */
static void omap1510_prepare_endpoint_for_rx(int ep_addr)
{
	int ep_num = ep_addr & USB_ENDPOINT_NUMBER_MASK;
	UDCDBGA ("omap1510_prepare_endpoint %x", ep_addr);
	if (((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)) {
		if ((inw (UDC_EP_RX (ep_num)) &
		     (UDC_EPn_RX_Valid | UDC_EPn_RX_Iso)) ==
		    UDC_EPn_RX_Valid) {
			outw (UDC_EP_Sel | ep_num, UDC_EP_NUM);
			outw (UDC_Set_FIFO_En, UDC_CTRL);
			outw (0, UDC_EP_NUM);
		}
	}
}