]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_usb.c
boards.cfg: Run the reformatter script
[karo-tx-uboot.git] / common / cmd_usb.c
index adc5f02a2cb7e328346209350c20e6c197c7c48e..2519497dad8cf1a821cbf4c8889a7e38d74aca43 100644 (file)
@@ -5,24 +5,7 @@
  * Most of this source has been derived from the Linux USB
  * project.
  *
- * 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+
  */
 
 #include <common.h>
@@ -287,12 +270,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 */