2 * Copyright (c) 2007-2008, Juniper Networks, Inc.
3 * Copyright (c) 2008, Excito Elektronik i Skåne AB
4 * Copyright (c) 2008, Michael Trimarchi <trimarchimichael@yahoo.it>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation version 2 of
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <asm/byteorder.h>
33 struct ehci_hccr *hccr; /* R/O registers, not need for volatile */
34 volatile struct ehci_hcor *hcor;
36 static uint16_t portreset;
37 static struct QH qh_list __attribute__((aligned(32)));
39 static struct descriptor {
40 struct usb_hub_descriptor hub;
41 struct usb_device_descriptor device;
42 struct usb_linux_config_descriptor config;
43 struct usb_linux_interface_descriptor interface;
44 struct usb_endpoint_descriptor endpoint;
45 } __attribute__ ((packed)) descriptor = {
47 0x8, /* bDescLength */
48 0x29, /* bDescriptorType: hub descriptor */
49 2, /* bNrPorts -- runtime modified */
50 0, /* wHubCharacteristics */
51 0xff, /* bPwrOn2PwrGood */
52 0, /* bHubCntrCurrent */
53 {}, /* Device removable */
54 {} /* at most 7 ports! XXX */
58 1, /* bDescriptorType: UDESC_DEVICE */
59 cpu_to_le16(0x0200), /* bcdUSB: v2.0 */
60 9, /* bDeviceClass: UDCLASS_HUB */
61 0, /* bDeviceSubClass: UDSUBCLASS_HUB */
62 1, /* bDeviceProtocol: UDPROTO_HSHUBSTT */
63 64, /* bMaxPacketSize: 64 bytes */
64 0x0000, /* idVendor */
65 0x0000, /* idProduct */
66 cpu_to_le16(0x0100), /* bcdDevice */
67 1, /* iManufacturer */
69 0, /* iSerialNumber */
70 1 /* bNumConfigurations: 1 */
74 2, /* bDescriptorType: UDESC_CONFIG */
76 1, /* bNumInterface */
77 1, /* bConfigurationValue */
78 0, /* iConfiguration */
79 0x40, /* bmAttributes: UC_SELF_POWER */
84 4, /* bDescriptorType: UDESC_INTERFACE */
85 0, /* bInterfaceNumber */
86 0, /* bAlternateSetting */
87 1, /* bNumEndpoints */
88 9, /* bInterfaceClass: UICLASS_HUB */
89 0, /* bInterfaceSubClass: UISUBCLASS_HUB */
90 0, /* bInterfaceProtocol: UIPROTO_HSHUBSTT */
95 5, /* bDescriptorType: UDESC_ENDPOINT */
96 0x81, /* bEndpointAddress:
97 * UE_DIR_IN | EHCI_INTR_ENDPT
99 3, /* bmAttributes: UE_INTERRUPT */
100 8, /* wMaxPacketSize */
105 #if defined(CONFIG_EHCI_IS_TDI)
106 #define ehci_is_TDI() (1)
108 #define ehci_is_TDI() (0)
111 #if defined(CONFIG_EHCI_DCACHE)
113 * Routines to handle (flush/invalidate) the dcache for the QH and qTD
114 * structures and data buffers. This is needed on platforms using this
115 * EHCI support with dcache enabled.
117 static void flush_invalidate(u32 addr, int size, int flush)
120 flush_dcache_range(addr, addr + size);
122 invalidate_dcache_range(addr, addr + size);
125 static void cache_qtd(struct qTD *qtd, int flush)
127 u32 *ptr = (u32 *)qtd->qt_buffer[0];
128 int len = (qtd->qt_token & 0x7fff0000) >> 16;
130 flush_invalidate((u32)qtd, sizeof(struct qTD), flush);
132 flush_invalidate((u32)ptr, len, flush);
136 static inline struct QH *qh_addr(struct QH *qh)
138 return (struct QH *)((u32)qh & 0xffffffe0);
141 static void cache_qh(struct QH *qh, int flush)
145 static struct qTD *first_qtd;
148 * Walk the QH list and flush/invalidate all entries
151 flush_invalidate((u32)qh_addr(qh), sizeof(struct QH), flush);
152 if ((u32)qh & QH_LINK_TYPE_QH)
155 qh = (struct QH *)qh->qh_link;
160 * Save first qTD pointer, needed for invalidating pass on this QH
163 first_qtd = qtd = (struct qTD *)(*(u32 *)&qh->qh_overlay &
169 * Walk the qTD list and flush/invalidate all entries
174 cache_qtd(qtd, flush);
175 next = (struct qTD *)((u32)qtd->qt_next & 0xffffffe0);
182 static inline void ehci_flush_dcache(struct QH *qh)
187 static inline void ehci_invalidate_dcache(struct QH *qh)
191 #else /* CONFIG_EHCI_DCACHE */
195 static inline void ehci_flush_dcache(struct QH *qh)
199 static inline void ehci_invalidate_dcache(struct QH *qh)
202 #endif /* CONFIG_EHCI_DCACHE */
204 static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
208 result = ehci_readl(ptr);
210 if (result == ~(uint32_t)0)
220 static void ehci_free(void *p, size_t sz)
225 static int ehci_reset(void)
232 cmd = ehci_readl(&hcor->or_usbcmd);
233 cmd = (cmd & ~CMD_RUN) | CMD_RESET;
234 ehci_writel(&hcor->or_usbcmd, cmd);
235 ret = handshake((uint32_t *)&hcor->or_usbcmd, CMD_RESET, 0, 250 * 1000);
237 printf("EHCI fail to reset\n");
242 reg_ptr = (uint32_t *)((u8 *)hcor + USBMODE);
243 tmp = ehci_readl(reg_ptr);
244 tmp |= USBMODE_CM_HC;
245 #if defined(CONFIG_EHCI_MMIO_BIG_ENDIAN)
248 ehci_writel(reg_ptr, tmp);
254 static void *ehci_alloc(size_t sz, size_t align)
256 static struct QH qh __attribute__((aligned(32)));
257 static struct qTD td[3] __attribute__((aligned (32)));
262 case sizeof(struct QH):
266 case sizeof(struct qTD):
268 debug("out of TDs\n");
275 debug("unknown allocation size\n");
283 static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
285 uint32_t addr, delta, next;
288 addr = (uint32_t) buf;
291 td->qt_buffer[idx] = cpu_to_hc32(addr);
292 td->qt_buffer_hi[idx] = 0;
293 next = (addr + 4096) & ~4095;
303 debug("out of buffer pointers (%u bytes left)\n", sz);
311 ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
312 int length, struct devrequest *req)
316 volatile struct qTD *vtd;
319 uint32_t endpt, token, usbsts;
325 debug("dev=%p, pipe=%lx, buffer=%p, length=%d, req=%p\n", dev, pipe,
326 buffer, length, req);
328 debug("req=%u (%#x), type=%u (%#x), value=%u (%#x), index=%u\n",
329 req->request, req->request,
330 req->requesttype, req->requesttype,
331 le16_to_cpu(req->value), le16_to_cpu(req->value),
332 le16_to_cpu(req->index));
334 qh = ehci_alloc(sizeof(struct QH), 32);
336 debug("unable to allocate QH\n");
339 qh->qh_link = cpu_to_hc32((uint32_t)&qh_list | QH_LINK_TYPE_QH);
340 c = (usb_pipespeed(pipe) != USB_SPEED_HIGH &&
341 usb_pipeendpoint(pipe) == 0) ? 1 : 0;
344 (usb_maxpacket(dev, pipe) << 16) |
347 (usb_pipespeed(pipe) << 12) |
348 (usb_pipeendpoint(pipe) << 8) |
349 (0 << 7) | (usb_pipedevice(pipe) << 0);
350 qh->qh_endpt1 = cpu_to_hc32(endpt);
352 (dev->portnr << 23) |
353 (dev->parent->devnum << 16) | (0 << 8) | (0 << 0);
354 qh->qh_endpt2 = cpu_to_hc32(endpt);
355 qh->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
358 tdp = &qh->qh_overlay.qt_next;
361 usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
364 td = ehci_alloc(sizeof(struct qTD), 32);
366 debug("unable to allocate SETUP td\n");
369 td->qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
370 td->qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
372 (sizeof(*req) << 16) |
373 (0 << 15) | (0 << 12) | (3 << 10) | (2 << 8) | (0x80 << 0);
374 td->qt_token = cpu_to_hc32(token);
375 if (ehci_td_buffer(td, req, sizeof(*req)) != 0) {
376 debug("unable construct SETUP td\n");
377 ehci_free(td, sizeof(*td));
380 *tdp = cpu_to_hc32((uint32_t) td);
385 if (length > 0 || req == NULL) {
386 td = ehci_alloc(sizeof(struct qTD), 32);
388 debug("unable to allocate DATA td\n");
391 td->qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
392 td->qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
393 token = (toggle << 31) |
395 ((req == NULL ? 1 : 0) << 15) |
398 ((usb_pipein(pipe) ? 1 : 0) << 8) | (0x80 << 0);
399 td->qt_token = cpu_to_hc32(token);
400 if (ehci_td_buffer(td, buffer, length) != 0) {
401 debug("unable construct DATA td\n");
402 ehci_free(td, sizeof(*td));
405 *tdp = cpu_to_hc32((uint32_t) td);
410 td = ehci_alloc(sizeof(struct qTD), 32);
412 debug("unable to allocate ACK td\n");
415 td->qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
416 td->qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
417 token = (toggle << 31) |
422 ((usb_pipein(pipe) ? 0 : 1) << 8) | (0x80 << 0);
423 td->qt_token = cpu_to_hc32(token);
424 *tdp = cpu_to_hc32((uint32_t) td);
428 qh_list.qh_link = cpu_to_hc32((uint32_t) qh | QH_LINK_TYPE_QH);
431 ehci_flush_dcache(&qh_list);
433 usbsts = ehci_readl(&hcor->or_usbsts);
434 ehci_writel(&hcor->or_usbsts, (usbsts & 0x3f));
436 /* Enable async. schedule. */
437 cmd = ehci_readl(&hcor->or_usbcmd);
439 ehci_writel(&hcor->or_usbcmd, cmd);
441 ret = handshake((uint32_t *)&hcor->or_usbsts, STD_ASS, STD_ASS,
444 printf("EHCI fail timeout STD_ASS set\n");
448 /* Wait for TDs to be processed. */
451 timeout = USB_TIMEOUT_MS(pipe);
453 /* Invalidate dcache */
454 ehci_invalidate_dcache(&qh_list);
455 token = hc32_to_cpu(vtd->qt_token);
459 } while (get_timer(ts) < timeout);
461 /* Check that the TD processing happened */
463 printf("EHCI timed out on TD - token=%#x\n", token);
467 /* Disable async schedule. */
468 cmd = ehci_readl(&hcor->or_usbcmd);
470 ehci_writel(&hcor->or_usbcmd, cmd);
472 ret = handshake((uint32_t *)&hcor->or_usbsts, STD_ASS, 0,
475 printf("EHCI fail timeout STD_ASS reset\n");
479 qh_list.qh_link = cpu_to_hc32((uint32_t)&qh_list | QH_LINK_TYPE_QH);
481 token = hc32_to_cpu(qh->qh_overlay.qt_token);
482 if (!(token & 0x80)) {
483 debug("TOKEN=%#x\n", token);
484 switch (token & 0xfc) {
486 toggle = token >> 31;
487 usb_settoggle(dev, usb_pipeendpoint(pipe),
488 usb_pipeout(pipe), toggle);
492 dev->status = USB_ST_STALLED;
496 dev->status = USB_ST_BUF_ERR;
500 dev->status = USB_ST_BABBLE_DET;
503 dev->status = USB_ST_CRC_ERR;
504 if ((token & 0x40) == 0x40)
505 dev->status |= USB_ST_STALLED;
508 dev->act_len = length - ((token >> 16) & 0x7fff);
511 debug("dev=%u, usbsts=%#x, p[1]=%#x, p[2]=%#x\n",
512 dev->devnum, ehci_readl(&hcor->or_usbsts),
513 ehci_readl(&hcor->or_portsc[0]),
514 ehci_readl(&hcor->or_portsc[1]));
517 return (dev->status != USB_ST_NOT_PROC) ? 0 : -1;
520 td = (void *)hc32_to_cpu(qh->qh_overlay.qt_next);
521 while (td != (void *)QT_NEXT_TERMINATE) {
522 qh->qh_overlay.qt_next = td->qt_next;
523 ehci_free(td, sizeof(*td));
524 td = (void *)hc32_to_cpu(qh->qh_overlay.qt_next);
526 ehci_free(qh, sizeof(*qh));
530 static inline int min3(int a, int b, int c)
541 ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
542 int length, struct devrequest *req)
549 uint32_t *status_reg;
551 if (le16_to_cpu(req->index) > CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS) {
552 printf("The request port(%d) is not configured\n",
553 le16_to_cpu(req->index) - 1);
556 status_reg = (uint32_t *)&hcor->or_portsc[
557 le16_to_cpu(req->index) - 1];
560 debug("req=%u (%#x), type=%u (%#x), value=%u, index=%u\n",
561 req->request, req->request,
562 req->requesttype, req->requesttype,
563 le16_to_cpu(req->value), le16_to_cpu(req->index));
565 typeReq = req->request | req->requesttype << 8;
568 case DeviceRequest | USB_REQ_GET_DESCRIPTOR:
569 switch (le16_to_cpu(req->value) >> 8) {
571 debug("USB_DT_DEVICE request\n");
572 srcptr = &descriptor.device;
576 debug("USB_DT_CONFIG config\n");
577 srcptr = &descriptor.config;
581 debug("USB_DT_STRING config\n");
582 switch (le16_to_cpu(req->value) & 0xff) {
583 case 0: /* Language */
588 srcptr = "\16\3u\0-\0b\0o\0o\0t\0";
591 case 2: /* Product */
592 srcptr = "\52\3E\0H\0C\0I\0 "
594 "\0C\0o\0n\0t\0r\0o\0l\0l\0e\0r\0";
598 debug("unknown value DT_STRING %x\n",
599 le16_to_cpu(req->value));
604 debug("unknown value %x\n", le16_to_cpu(req->value));
608 case USB_REQ_GET_DESCRIPTOR | ((USB_DIR_IN | USB_RT_HUB) << 8):
609 switch (le16_to_cpu(req->value) >> 8) {
611 debug("USB_DT_HUB config\n");
612 srcptr = &descriptor.hub;
616 debug("unknown value %x\n", le16_to_cpu(req->value));
620 case USB_REQ_SET_ADDRESS | (USB_RECIP_DEVICE << 8):
621 debug("USB_REQ_SET_ADDRESS\n");
622 rootdev = le16_to_cpu(req->value);
624 case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
625 debug("USB_REQ_SET_CONFIGURATION\n");
628 case USB_REQ_GET_STATUS | ((USB_DIR_IN | USB_RT_HUB) << 8):
629 tmpbuf[0] = 1; /* USB_STATUS_SELFPOWERED */
634 case USB_REQ_GET_STATUS | ((USB_RT_PORT | USB_DIR_IN) << 8):
635 memset(tmpbuf, 0, 4);
636 reg = ehci_readl(status_reg);
637 if (reg & EHCI_PS_CS)
638 tmpbuf[0] |= USB_PORT_STAT_CONNECTION;
639 if (reg & EHCI_PS_PE)
640 tmpbuf[0] |= USB_PORT_STAT_ENABLE;
641 if (reg & EHCI_PS_SUSP)
642 tmpbuf[0] |= USB_PORT_STAT_SUSPEND;
643 if (reg & EHCI_PS_OCA)
644 tmpbuf[0] |= USB_PORT_STAT_OVERCURRENT;
645 if (reg & EHCI_PS_PR)
646 tmpbuf[0] |= USB_PORT_STAT_RESET;
647 if (reg & EHCI_PS_PP)
648 tmpbuf[1] |= USB_PORT_STAT_POWER >> 8;
651 switch ((reg >> 26) & 3) {
655 tmpbuf[1] |= USB_PORT_STAT_LOW_SPEED >> 8;
659 tmpbuf[1] |= USB_PORT_STAT_HIGH_SPEED >> 8;
663 tmpbuf[1] |= USB_PORT_STAT_HIGH_SPEED >> 8;
666 if (reg & EHCI_PS_CSC)
667 tmpbuf[2] |= USB_PORT_STAT_C_CONNECTION;
668 if (reg & EHCI_PS_PEC)
669 tmpbuf[2] |= USB_PORT_STAT_C_ENABLE;
670 if (reg & EHCI_PS_OCC)
671 tmpbuf[2] |= USB_PORT_STAT_C_OVERCURRENT;
672 if (portreset & (1 << le16_to_cpu(req->index)))
673 tmpbuf[2] |= USB_PORT_STAT_C_RESET;
678 case USB_REQ_SET_FEATURE | ((USB_DIR_OUT | USB_RT_PORT) << 8):
679 reg = ehci_readl(status_reg);
680 reg &= ~EHCI_PS_CLEAR;
681 switch (le16_to_cpu(req->value)) {
682 case USB_PORT_FEAT_ENABLE:
684 ehci_writel(status_reg, reg);
686 case USB_PORT_FEAT_POWER:
687 if (HCS_PPC(ehci_readl(&hccr->cr_hcsparams))) {
689 ehci_writel(status_reg, reg);
692 case USB_PORT_FEAT_RESET:
693 if ((reg & (EHCI_PS_PE | EHCI_PS_CS)) == EHCI_PS_CS &&
695 EHCI_PS_IS_LOWSPEED(reg)) {
696 /* Low speed device, give up ownership. */
697 debug("port %d low speed --> companion\n",
700 ehci_writel(status_reg, reg);
707 ehci_writel(status_reg, reg);
709 * caller must wait, then call GetPortStatus
710 * usb 2.0 specification say 50 ms resets on
714 /* terminate the reset */
715 ehci_writel(status_reg, reg & ~EHCI_PS_PR);
717 * A host controller must terminate the reset
718 * and stabilize the state of the port within
721 ret = handshake(status_reg, EHCI_PS_PR, 0,
725 1 << le16_to_cpu(req->index);
727 printf("port(%d) reset error\n",
728 le16_to_cpu(req->index) - 1);
732 debug("unknown feature %x\n", le16_to_cpu(req->value));
735 /* unblock posted writes */
736 (void) ehci_readl(&hcor->or_usbcmd);
738 case USB_REQ_CLEAR_FEATURE | ((USB_DIR_OUT | USB_RT_PORT) << 8):
739 reg = ehci_readl(status_reg);
740 switch (le16_to_cpu(req->value)) {
741 case USB_PORT_FEAT_ENABLE:
744 case USB_PORT_FEAT_C_ENABLE:
745 reg = (reg & ~EHCI_PS_CLEAR) | EHCI_PS_PE;
747 case USB_PORT_FEAT_POWER:
748 if (HCS_PPC(ehci_readl(&hccr->cr_hcsparams)))
749 reg = reg & ~(EHCI_PS_CLEAR | EHCI_PS_PP);
750 case USB_PORT_FEAT_C_CONNECTION:
751 reg = (reg & ~EHCI_PS_CLEAR) | EHCI_PS_CSC;
753 case USB_PORT_FEAT_OVER_CURRENT:
754 reg = (reg & ~EHCI_PS_CLEAR) | EHCI_PS_OCC;
756 case USB_PORT_FEAT_C_RESET:
757 portreset &= ~(1 << le16_to_cpu(req->index));
760 debug("unknown feature %x\n", le16_to_cpu(req->value));
763 ehci_writel(status_reg, reg);
764 /* unblock posted write */
765 (void) ehci_readl(&hcor->or_usbcmd);
768 debug("Unknown request\n");
773 len = min3(srclen, le16_to_cpu(req->length), length);
774 if (srcptr != NULL && len > 0)
775 memcpy(buffer, srcptr, len);
784 debug("requesttype=%x, request=%x, value=%x, index=%x, length=%x\n",
785 req->requesttype, req->request, le16_to_cpu(req->value),
786 le16_to_cpu(req->index), le16_to_cpu(req->length));
789 dev->status = USB_ST_STALLED;
793 int usb_lowlevel_stop(void)
795 return ehci_hcd_stop();
798 int usb_lowlevel_init(void)
803 if (ehci_hcd_init() != 0)
806 /* EHCI spec section 4.1 */
807 if (ehci_reset() != 0)
810 #if defined(CONFIG_EHCI_HCD_INIT_AFTER_RESET)
811 if (ehci_hcd_init() != 0)
815 /* Set head of reclaim list */
816 memset(&qh_list, 0, sizeof(qh_list));
817 qh_list.qh_link = cpu_to_hc32((uint32_t)&qh_list | QH_LINK_TYPE_QH);
818 qh_list.qh_endpt1 = cpu_to_hc32((1 << 15) | (USB_SPEED_HIGH << 12));
819 qh_list.qh_curtd = cpu_to_hc32(QT_NEXT_TERMINATE);
820 qh_list.qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
821 qh_list.qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
822 qh_list.qh_overlay.qt_token = cpu_to_hc32(0x40);
824 /* Set async. queue head pointer. */
825 ehci_writel(&hcor->or_asynclistaddr, (uint32_t)&qh_list);
827 reg = ehci_readl(&hccr->cr_hcsparams);
828 descriptor.hub.bNbrPorts = HCS_N_PORTS(reg);
829 printf("Register %x NbrPorts %d\n", reg, descriptor.hub.bNbrPorts);
830 /* Port Indicators */
831 if (HCS_INDICATOR(reg))
832 descriptor.hub.wHubCharacteristics |= 0x80;
833 /* Port Power Control */
835 descriptor.hub.wHubCharacteristics |= 0x01;
837 /* Start the host controller. */
838 cmd = ehci_readl(&hcor->or_usbcmd);
840 * Philips, Intel, and maybe others need CMD_RUN before the
841 * root hub will detect new devices (why?); NEC doesn't
843 cmd &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET);
845 ehci_writel(&hcor->or_usbcmd, cmd);
847 /* take control over the ports */
848 cmd = ehci_readl(&hcor->or_configflag);
850 ehci_writel(&hcor->or_configflag, cmd);
851 /* unblock posted write */
852 cmd = ehci_readl(&hcor->or_usbcmd);
854 reg = HC_VERSION(ehci_readl(&hccr->cr_capbase));
855 printf("USB EHCI %x.%02x\n", reg >> 8, reg & 0xff);
863 submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
867 if (usb_pipetype(pipe) != PIPE_BULK) {
868 debug("non-bulk pipe (type=%lu)", usb_pipetype(pipe));
871 return ehci_submit_async(dev, pipe, buffer, length, NULL);
875 submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
876 int length, struct devrequest *setup)
879 if (usb_pipetype(pipe) != PIPE_CONTROL) {
880 debug("non-control pipe (type=%lu)", usb_pipetype(pipe));
884 if (usb_pipedevice(pipe) == rootdev) {
886 dev->speed = USB_SPEED_HIGH;
887 return ehci_submit_root(dev, pipe, buffer, length, setup);
889 return ehci_submit_async(dev, pipe, buffer, length, setup);
893 submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
894 int length, int interval)
897 debug("dev=%p, pipe=%lu, buffer=%p, length=%d, interval=%d",
898 dev, pipe, buffer, length, interval);