[U-Boot] [PATCH 1/6] usb : musb : Add high speed field in usb_device structure

Thomas Abraham t-abraham at ti.com
Tue Dec 16 10:57:28 CET 2008


This patch adds support for identification of high speed devices.
For high spped devices that are connected via hubs, the information
that the device is high speed is recorded. This is required by Mentor
USB Host controller driver.

Signed-off-by: Ravi Babu <ravibabu at ti.com>
Signed-off-by: Swaminathan S <swami.iyer at ti.com>
Signed-off-by: Thomas Abraham <t-abraham at ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta at ti.com>
---
 common/usb.c       |    1 +
 include/usb.h      |    1 +
 include/usb_defs.h |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index ee18152..f8379c9 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -1137,6 +1137,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)
 	/* Allocate a new device struct for it */
 	usb = usb_alloc_new_device();
 	usb->slow = (portstatus & USB_PORT_STAT_LOW_SPEED) ? 1 : 0;
+	usb->high = (portstatus & USB_PORT_STAT_HIGH_SPEED) ? 1 : 0;
 
 	dev->children[port] = usb;
 	usb->parent = dev;
diff --git a/include/usb.h b/include/usb.h
index 510df95..e6aa551 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -139,6 +139,7 @@ enum {
 struct usb_device {
 	int	devnum;			/* Device number on USB bus */
 	int	slow;			/* Slow device? */
+	int     high;			/* High speed device? */
 	char	mf[32];			/* manufacturer */
 	char	prod[32];		/* product */
 	char	serial[32];		/* serial number */
diff --git a/include/usb_defs.h b/include/usb_defs.h
index 353019f..500a0ad 100644
--- a/include/usb_defs.h
+++ b/include/usb_defs.h
@@ -216,6 +216,7 @@
 #define USB_PORT_STAT_RESET         0x0010
 #define USB_PORT_STAT_POWER         0x0100
 #define USB_PORT_STAT_LOW_SPEED     0x0200
+#define USB_PORT_STAT_HIGH_SPEED    0x0400
 
 /* wPortChange bits */
 #define USB_PORT_STAT_C_CONNECTION  0x0001
-- 
1.5.6



More information about the U-Boot mailing list