summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-08-07 13:13:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-08-07 13:13:47 +0200
commit038be0fbb5e983a498752b283319ba926f994a4b (patch)
tree5c22a5e6ad20114d7f59ad177c8f6bcafeba90c0 /drivers/usb/host
parent9cce00617bf67a462eabd8c473c423f78414a8e8 (diff)
parentbe8ef22b5f403af78c7036502f6c15f643839edf (diff)
downloadbarebox-038be0fbb5e983a498752b283319ba926f994a4b.tar.gz
barebox-038be0fbb5e983a498752b283319ba926f994a4b.tar.xz
Merge branch 'for-next/usb'
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-hcd.c17
-rw-r--r--drivers/usb/host/ohci-hcd.c2
2 files changed, 16 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 2da3edd296..d30c3aa1d1 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -229,16 +229,29 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
qh = &ehci->qh_list[1];
qh->qh_link = cpu_to_hc32((uint32_t)ehci->qh_list | QH_LINK_TYPE_QH);
- c = (usb_pipespeed(pipe) != USB_SPEED_HIGH &&
+ c = (dev->speed != USB_SPEED_HIGH &&
usb_pipeendpoint(pipe) == 0) ? 1 : 0;
endpt = (8 << 28) |
(c << 27) |
(usb_maxpacket(dev, pipe) << 16) |
(0 << 15) |
(1 << 14) |
- (usb_pipespeed(pipe) << 12) |
(usb_pipeendpoint(pipe) << 8) |
(0 << 7) | (usb_pipedevice(pipe) << 0);
+ switch (dev->speed) {
+ case USB_SPEED_FULL:
+ endpt |= 0 << 12;
+ break;
+ case USB_SPEED_LOW:
+ endpt |= 1 << 12;
+ break;
+ case USB_SPEED_HIGH:
+ endpt |= 2 << 12;
+ break;
+ default:
+ return -EINVAL;
+ }
+
qh->qh_endpt1 = cpu_to_hc32(endpt);
endpt = (1 << 30) |
(dev->portnr << 23) |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 8bf20d0d61..3d18a73325 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -794,7 +794,7 @@ static struct ed *ep_add_ed(struct usb_device *usb_dev, unsigned long pipe,
| (usb_pipeisoc(pipe) ? 0x8000 : 0)
| (usb_pipecontrol(pipe) ? 0 : \
(usb_pipeout(pipe) ? 0x800 : 0x1000))
- | usb_pipeslow(pipe) << 13
+ | (usb_dev->speed == USB_SPEED_LOW) << 13
| usb_maxpacket(usb_dev, pipe) << 16);
if (ed->type == PIPE_INTERRUPT && ed->state == ED_UNLINK) {