]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: dwc2: implement interrupt transfers
authorStephen Warren <swarren@wwwdotorg.org>
Sat, 11 Apr 2015 03:05:22 +0000 (21:05 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:08 +0000 (21:47 +0200)
As best I can tell, there's no difference between bulk and interrupt
transfers in terms of how the HW should be programmed, at least given
that we're executing one transaction at a time rather than scheduling
them into frames for maximum throughput.

This patch ends up sharing the toggle bit state between bulk and
interrupt transfers on a particular EP. However I believe this is fine;
AFAIK a given EP either uses bulk or interrupt transfers and doesn't mix
them.

This patch doesn't do anything with the "interval" parameter for
interrupt transfers, but then most other USB controller drivers in U-Boot
don't either.

It turns out that one of my keyboards is happy to work using control
transfers but the other only gives non-zero "HID reports" via interrupt
transfers.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
drivers/usb/host/dwc2.c

index b1d94ccc1a693ab41505f9d75fdb976eb58fa38f..f3fbe76acf9b094604585aeda52dbec22d8a608b 100644 (file)
@@ -904,9 +904,8 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
                   int len, int interval)
 {
-       printf("dev = %p pipe = %#lx buf = %p size = %d int = %d\n",
-              dev, pipe, buffer, len, interval);
-       return -ENOSYS;
+       /* FIXME: what is interval? */
+       return submit_bulk_msg(dev, pipe, buffer, len);
 }
 
 /* U-Boot USB control interface */