/* Disables the udc device : disables clocks, udc interrupts, control endpoint interrupts.  */
static void udc_disable(struct pxa_udc *udc)
/* Disables the udc device : disables clocks, udc interrupts, control endpoint interrupts.  */
static void udc_disable(struct pxa_udc *udc)
{
	if (!udc->enabled)
		return;
	udc_writel(udc, UDCICR0, 0);
	udc_writel(udc, UDCICR1, 0);
	udc_clear_mask_UDCCR(udc, UDCCR_UDE);
	clk_disable(udc->clk);
	ep0_idle(udc);
	udc->gadget.speed = USB_SPEED_UNKNOWN;
	udc->enabled = 0;
}