summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authormake shi <b15407@freescale.com>2013-01-23 10:36:00 +0800
committerAnthony Felice <tony.felice@timesys.com>2014-01-16 15:36:32 -0500
commit412af3d25ba76f8dfda3bd9d2715e1119e671d32 (patch)
treee3af66fbede5013d3ffe2842266a365924ff61ca /drivers/usb/host/ehci-hcd.c
parent3028181b4c1a1e078422b5de929605d893d60d1a (diff)
ENGR00241582 MX6 USB host: USB host certification patch
The patch include: - USB test mode on hub port and Root-hub port - support 3 types of message: too much hub ties for hub attachment too much power consumption for device attachment unsupported device class warning - support menuconfig select the FSL_USB_TEST_MODE, located in: -> Device Drivers -> USB support (USB_SUPPORT [=y]) -> FSL High-speed Electrical Test Mode support Signed-off-by: make shi <b15407@freescale.com>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ffc22bf1d825..c486480ab982 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -48,6 +48,21 @@
#include <asm/system.h>
#include <asm/unaligned.h>
+
+#ifdef CONFIG_FSL_USB_TEST_MODE
+static u32 single_step_desc_data_on;
+void set_single_step_desc_data_on(void)
+{
+ single_step_desc_data_on = 1;
+}
+EXPORT_SYMBOL_GPL(set_single_step_desc_data_on);
+
+void clear_single_step_desc_data_on(void)
+{
+ single_step_desc_data_on = 0;
+}
+EXPORT_SYMBOL_GPL(clear_single_step_desc_data_on);
+#endif
/*-------------------------------------------------------------------------*/
/*
@@ -959,8 +974,22 @@ static int ehci_urb_enqueue (
/* FALLTHROUGH */
/* case PIPE_BULK: */
default:
- if (!qh_urb_transaction (ehci, urb, &qtd_list, mem_flags))
+#ifdef CONFIG_FSL_USB_TEST_MODE
+ if (!single_step_desc_data_on) {
+ printk(KERN_DEBUG "in test mode, but single step NOT on\n");
+ if (!qh_urb_transaction(ehci, urb, &qtd_list,
+ mem_flags))
+ return -ENOMEM;
+ } else {
+ printk(KERN_DEBUG "in test mode, single step on\n");
+ if (!single_step_qh_urb_transaction(ehci, urb,
+ &qtd_list, mem_flags))
+ return -ENOMEM;
+ }
+#else
+ if (!qh_urb_transaction(ehci, urb, &qtd_list, mem_flags))
return -ENOMEM;
+#endif
return submit_async(ehci, urb, &qtd_list, mem_flags);
case PIPE_INTERRUPT: