]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/usb.c
cmd_mtdparts.c: report ECC status along with the partition map
[karo-tx-uboot.git] / common / usb.c
index 8407974f773c69173354463ac24108a083bc5439..f740e5ec219cbe42a8d7375ed582b277a2ebc50b 100644 (file)
@@ -1,5 +1,4 @@
 /*
- *
  * Most of this source has been derived from the Linux USB
  * project:
  * (C) Copyright Linus Torvalds 1999
  * Adapted for U-Boot:
  * (C) Copyright 2001 Denis Peter, MPL AG Switzerland
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -409,6 +391,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;
@@ -879,6 +866,11 @@ int usb_new_device(struct usb_device *dev)
        }
 
        dev->descriptor.bMaxPacketSize0 = desc->bMaxPacketSize0;
+       /*
+        * Fetch the device class, driver can use this info
+        * to differentiate between HUB and DEVICE.
+        */
+       dev->descriptor.bDeviceClass = desc->bDeviceClass;
 
        /* find the port number we're at */
        if (parent) {