UDC_RXDMA_CFG_REG &= ~mask; 
UDC_RXDMA_CFG_REG = (UDC_RXDMA_CFG_REG & ~mask) | UDC_DMA_REQ; 
static void dma_channel_release(struct omap_ep *ep){	int		shift = 4 * (ep->dma_channel - 1);	u16		mask = 0x0f << shift;	struct omap_req	*req;	int		active;	/* abort any active usb transfer request */	if (!list_empty(&ep->queue))		req = container_of(ep->queue.next, struct omap_req, queue);	else		req = NULL;	active = ((1 << 7) & omap_readl(OMAP_DMA_CCR(ep->lch))) != 0;	DBG("%s release %s %cxdma%d %p\n", ep->ep.name,			active ? "active" : "idle",			(ep->bEndpointAddress & USB_DIR_IN) ? 't' : 'r',			ep->dma_channel - 1, req);	/* wait till current packet DMA finishes, and fifo empties */	if (ep->bEndpointAddress & USB_DIR_IN) {		UDC_TXDMA_CFG_REG &= ~mask;		if (req) {			finish_in_dma(ep, req, -ECONNRESET);			/* clear FIFO; hosts probably won't empty it */			use_ep(ep, UDC_EP_SEL);			UDC_CTRL_REG = UDC_CLR_EP;			deselect_ep();		}		while (UDC_TXDMA_CFG_REG & mask)			udelay(10);	} else {		UDC_RXDMA_CFG_REG &= ~mask;		/* dma empties the fifo */		while (UDC_RXDMA_CFG_REG & mask)			udelay(10);		if (req)			finish_out_dma(ep, req, -ECONNRESET);	}	omap_free_dma(ep->lch);	ep->dma_channel = 0;	ep->lch = -1;	/* has_dma still set, till endpoint is fully quiesced */}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/65111084c63d7674dc37833e8eb59cfdaa4d0bda/omap_udc.c/clean/drivers/usb/gadget/omap_udc.c