diff options
| author | Vivek Gautam <gautam.vivek@samsung.com> | 2013-04-12 16:34:38 +0530 | 
|---|---|---|
| committer | Marek Vasut <marex@denx.de> | 2013-05-05 23:54:22 +0200 | 
| commit | 6497c66704d03956e7ea49b54fcaa38740736416 (patch) | |
| tree | 409cd69a5d470bb5dd867d05df9b90aa82313e44 /common | |
| parent | 289f3cb28a3916b6c4c770db9a88463884be5b6c (diff) | |
| download | olio-uboot-2014.01-6497c66704d03956e7ea49b54fcaa38740736416.tar.xz olio-uboot-2014.01-6497c66704d03956e7ea49b54fcaa38740736416.zip | |
USB: SS: Add support for Super Speed USB interface
This adds usb framework support for super-speed usb, which will
further facilitate to add stack support for xHCI.
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Diffstat (limited to 'common')
| -rw-r--r-- | common/cmd_usb.c | 24 | ||||
| -rw-r--r-- | common/usb.c | 5 | ||||
| -rw-r--r-- | common/usb_hub.c | 8 | 
3 files changed, 29 insertions, 8 deletions
| diff --git a/common/cmd_usb.c b/common/cmd_usb.c index adc5f02a2..70e803b5b 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -287,12 +287,24 @@ static struct usb_device *usb_find_device(int devnum)  static inline char *portspeed(int speed)  { -	if (speed == USB_SPEED_HIGH) -		return "480 Mb/s"; -	else if (speed == USB_SPEED_LOW) -		return "1.5 Mb/s"; -	else -		return "12 Mb/s"; +	char *speed_str; + +	switch (speed) { +	case USB_SPEED_SUPER: +		speed_str = "5 Gb/s"; +		break; +	case USB_SPEED_HIGH: +		speed_str = "480 Mb/s"; +		break; +	case USB_SPEED_LOW: +		speed_str = "1.5 Mb/s"; +		break; +	default: +		speed_str = "12 Mb/s"; +		break; +	} + +	return speed_str;  }  /* shows the device tree recursively */ diff --git a/common/usb.c b/common/usb.c index 3a96a3423..55fff5b1e 100644 --- a/common/usb.c +++ b/common/usb.c @@ -409,6 +409,11 @@ static int usb_parse_config(struct usb_device *dev,  					wMaxPacketSize);  			debug("if %d, ep %d\n", ifno, epno);  			break; +		case USB_DT_SS_ENDPOINT_COMP: +			if_desc = &dev->config.if_desc[ifno]; +			memcpy(&if_desc->ss_ep_comp_desc[epno], +				&buffer[index], buffer[index]); +			break;  		default:  			if (head->bLength == 0)  				return 1; diff --git a/common/usb_hub.c b/common/usb_hub.c index ab419433f..1e225e6b3 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -165,7 +165,9 @@ static struct usb_hub_device *usb_hub_allocate(void)  static inline char *portspeed(int portstatus)  { -	if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED)) +	if (portstatus & (1 << USB_PORT_FEAT_SUPERSPEED)) +		return "5 Gb/s"; +	else if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED))  		return "480 Mb/s";  	else if (portstatus & (1 << USB_PORT_FEAT_LOWSPEED))  		return "1.5 Mb/s"; @@ -268,7 +270,9 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)  	/* Allocate a new device struct for it */  	usb = usb_alloc_new_device(dev->controller); -	if (portstatus & USB_PORT_STAT_HIGH_SPEED) +	if (portstatus & USB_PORT_STAT_SUPER_SPEED) +		usb->speed = USB_SPEED_SUPER; +	else if (portstatus & USB_PORT_STAT_HIGH_SPEED)  		usb->speed = USB_SPEED_HIGH;  	else if (portstatus & USB_PORT_STAT_LOW_SPEED)  		usb->speed = USB_SPEED_LOW; |