From 6519f4a136452cb7b97ee94906293ea73e1fdf04 Mon Sep 17 00:00:00 2001 From: yangkai Date: Thu, 2 Aug 2012 11:24:17 +0800 Subject: [PATCH] update for rk29 config switch --- drivers/usb/dwc_otg/dwc_otg_cil.c | 4 ++-- drivers/usb/dwc_otg/dwc_otg_pcd.c | 6 +++++- drivers/usb/gadget/epautoconf.c | 7 ++++++- drivers/usb/gadget/f_adb.c | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) mode change 100644 => 100755 drivers/usb/gadget/epautoconf.c diff --git a/drivers/usb/dwc_otg/dwc_otg_cil.c b/drivers/usb/dwc_otg/dwc_otg_cil.c index ec4f27fb9981..9f44adc2796f 100755 --- a/drivers/usb/dwc_otg/dwc_otg_cil.c +++ b/drivers/usb/dwc_otg/dwc_otg_cil.c @@ -729,8 +729,8 @@ void dwc_otg_core_dev_init(dwc_otg_core_if_t *_core_if) dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[0], 0x01000130 ); //ep1 tx fifo dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[1], 0x00800230 ); //ep3 tx fifo dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[2], 0x008002b0 ); //ep5 tx fifo - dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[2], 0x00800330 ); //ep7 tx fifo - dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[2], 0x001003b0 ); //ep9 tx fifo + dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[3], 0x00800330 ); //ep7 tx fifo + dwc_write_reg32( &global_regs->dptxfsiz_dieptxf[4], 0x001003b0 ); //ep9 tx fifo #endif if(_core_if->en_multiple_tx_fifo && _core_if->dma_enable) { diff --git a/drivers/usb/dwc_otg/dwc_otg_pcd.c b/drivers/usb/dwc_otg/dwc_otg_pcd.c index b6e4d28c4d66..6f6d975e09c6 100755 --- a/drivers/usb/dwc_otg/dwc_otg_pcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_pcd.c @@ -304,7 +304,7 @@ static int dwc_otg_pcd_ep_enable(struct usb_ep *_ep, if(ep->dwc_ep.is_in) { -#ifdef CONFIG_ARCH_RK30 +#ifndef CONFIG_ARCH_RK29 if(!pcd->otg_dev->core_if->en_multiple_tx_fifo) { ep->dwc_ep.tx_fifo_num = 0; @@ -1353,7 +1353,11 @@ void dwc_otg_pcd_reinit(dwc_otg_pcd_t *_pcd) "ep2in", "ep3in", "ep4in", +#ifdef CONFIG_ARCH_RK29 + "ep5in-int", +#else "ep5in", +#endif "ep6in", "ep7in", "ep8in", diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c old mode 100644 new mode 100755 index 9b7360ff5aa7..23e3077a9196 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -94,7 +94,7 @@ ep_matches ( /* bulk endpoints handle interrupt transfers, * except the toggle-quirky iso-synch kind */ - if ('s' == tmp[2]) // == "-iso" + if ('n' != tmp[2]) // == "-int" return 0; /* for now, avoid PXA "interrupt-in"; * it's documented as never using DATA1. @@ -112,6 +112,10 @@ ep_matches ( return 0; } } else { +#ifdef CONFIG_ARCH_RK29 + if (USB_ENDPOINT_XFER_INT == type) + return 0; +#endif tmp = ep->name + strlen (ep->name); } @@ -145,6 +149,7 @@ ep_matches ( /* INT: limit 64 bytes full speed, 1024 high speed */ if (!gadget->is_dualspeed && max > 64) return 0; + break; /* FALLTHROUGH */ case USB_ENDPOINT_XFER_ISOC: diff --git a/drivers/usb/gadget/f_adb.c b/drivers/usb/gadget/f_adb.c index 83e1f59385a2..076da888fae8 100755 --- a/drivers/usb/gadget/f_adb.c +++ b/drivers/usb/gadget/f_adb.c @@ -72,7 +72,7 @@ static struct usb_endpoint_descriptor adb_highspeed_in_desc = { .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, - .wMaxPacketSize = __constant_cpu_to_le16(64), + .wMaxPacketSize = __constant_cpu_to_le16(512), }; static struct usb_endpoint_descriptor adb_highspeed_out_desc = { -- 2.34.1