diff options
author | Tom Rini <trini@konsulko.com> | 2020-10-20 08:01:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-20 08:01:46 -0400 |
commit | f216259927be2f1f952fc69139e1e9b0c798eb1d (patch) | |
tree | 9cb2c547a22eb2ceede02a4ff27cc39bbacdbd6a /drivers/usb/common/common.c | |
parent | 7ec87e4192215815b658c3f8b34e4be010103149 (diff) | |
parent | 0cd791ced96e1510b26305c20f1199ee0d980902 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
- MediaTek USB host support
Diffstat (limited to 'drivers/usb/common/common.c')
-rw-r--r-- | drivers/usb/common/common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c index d4ae18693c6..5e5c3c3e3dc 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c @@ -46,8 +46,16 @@ static const char *const speed_names[] = { [USB_SPEED_HIGH] = "high-speed", [USB_SPEED_WIRELESS] = "wireless", [USB_SPEED_SUPER] = "super-speed", + [USB_SPEED_SUPER_PLUS] = "super-speed-plus", }; +const char *usb_speed_string(enum usb_device_speed speed) +{ + if (speed < 0 || speed >= ARRAY_SIZE(speed_names)) + speed = USB_SPEED_UNKNOWN; + return speed_names[speed]; +} + enum usb_device_speed usb_get_maximum_speed(ofnode node) { const char *max_speed; |