aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pxa-2.6/patches/002-usb_gadget.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/pxa-2.6/patches/002-usb_gadget.patch')
-rw-r--r--target/linux/pxa-2.6/patches/002-usb_gadget.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/pxa-2.6/patches/002-usb_gadget.patch b/target/linux/pxa-2.6/patches/002-usb_gadget.patch
new file mode 100644
index 0000000000..b6766d9b3b
--- /dev/null
+++ b/target/linux/pxa-2.6/patches/002-usb_gadget.patch
@@ -0,0 +1,58 @@
+diff -NurbwB linux-2.6.17/drivers/usb/gadget/pxa2xx_udc.c linux-2.6.17-patched/drivers/usb/gadget/pxa2xx_udc.c
+--- linux-2.6.17/drivers/usb/gadget/pxa2xx_udc.c 2006-06-17 18:49:35.000000000 -0700
++++ linux-2.6.17-patched/drivers/usb/gadget/pxa2xx_udc.c 2006-09-11 13:02:39.000000000 -0700
+@@ -87,8 +87,8 @@
+ static const char ep0name [] = "ep0";
+
+
+-// #define USE_DMA
+-// #define USE_OUT_DMA
++#define USE_DMA
++#define USE_OUT_DMA
+ // #define DISABLE_TEST_MODE
+
+ #ifdef CONFIG_ARCH_IXP4XX
+@@ -1513,7 +1513,7 @@
+ #endif
+
+ /* try to clear these bits before we enable the udc */
+- udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR);
++ udc_ack_int_UDCCR(UDCCR_SUSIR|UDCCR_RSTIR|UDCCR_RESIR);
+
+ ep0_idle(dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+@@ -2043,6 +2043,9 @@
+ struct pxa2xx_udc *dev = _dev;
+ int handled;
+
++
++ udc_set_mask_UDCCR( UDCCR_REM | UDCCR_SRM);
++
+ dev->stats.irqs++;
+ HEX_DISPLAY(dev->stats.irqs);
+ do {
+@@ -2137,6 +2139,8 @@
+ /* we could also ask for 1 msec SOF (SIR) interrupts */
+
+ } while (handled);
++
++ udc_clear_mask_UDCCR( UDCCR_SRM | UDCCR_REM);
+ return IRQ_HANDLED;
+ }
+
+@@ -2437,6 +2441,7 @@
+ int retval, out_dma = 1;
+ u32 chiprev;
+
++ local_irq_disable();
+ /* insist on Intel/ARM/XScale */
+ asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev));
+ if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) {
+@@ -2553,6 +2558,7 @@
+ #endif
+ }
+ #endif
++ local_irq_enable();
+ create_proc_files();
+
+ return 0;