--- s3c2410_udc.org.c 2008-01-21 17:22:30.000000000 -0600 +++ s3c2410_udc.c 2007-11-08 13:14:20.000000000 -0600 @@ -99,7 +99,7 @@ #define DEBUG_VERBOSE 2 #ifdef CONFIG_USB_S3C2410_DEBUG -#define USB_S3C2410_DEBUG_LEVEL 0 +#define USB_S3C2410_DEBUG_LEVEL 2 static uint32_t s3c2410_ticks = 0; @@ -618,7 +618,7 @@ } /* Seems to be needed to get it working. ouch :( */ - udelay(5); + udelay(35); udc_write(status & 0xFF, S3C2410_UDC_EP0_FIFO_REG); udc_write(status >> 8, S3C2410_UDC_EP0_FIFO_REG); s3c2410_udc_set_ep0_de_in(base_addr); @@ -701,7 +701,7 @@ } } break; - +/* case USB_REQ_CLEAR_FEATURE: s3c2410_udc_clear_ep0_opr(base_addr); @@ -727,7 +727,7 @@ s3c2410_udc_set_halt(&dev->ep[crq->wIndex & 0x7f].ep, 1); s3c2410_udc_set_ep0_de_out(base_addr); return; - +*/ default: s3c2410_udc_clear_ep0_opr(base_addr); break; @@ -1550,6 +1550,8 @@ static void s3c2410_udc_disable(struct s3c2410_udc *dev) { dprintk(DEBUG_NORMAL, "%s()\n", __func__); + /* turn off the enable line */ + s3c2410_gpio_setpin(S3C2410_GPC15, 1); /* Disable all interrupts */ udc_write(0x00, S3C2410_UDC_USB_INT_EN_REG); @@ -1625,6 +1627,9 @@ /* Enable ep0 interrupt */ udc_write(S3C2410_UDC_INT_EP0, S3C2410_UDC_EP_INT_EN_REG); + s3c2410_gpio_cfgpin(S3C2410_GPC15, S3C2410_GPIO_OUTPUT); + s3c2410_gpio_setpin(S3C2410_GPC15, 0); + /* time to say "hello, world" */ if (udc_info && udc_info->udc_command) udc_info->udc_command(S3C2410_UDC_P_ENABLE);