]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: udc: ci: update speed handling
authorLi Jun <jun.li@nxp.com>
Mon, 25 Jan 2021 13:43:58 +0000 (21:43 +0800)
committerMarek Vasut <marex@denx.de>
Sun, 31 Jan 2021 13:08:56 +0000 (14:08 +0100)
Remove the gadget driver speed check, and set its max_speed to
be USB_SPEED_HIGH.

Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/usb/gadget/ci_udc.c

index cdb8f6fb3d09bd6fcb927bb0d9f571f710084ca2..b64e4bb605d6576ac866bdda7b2f7831adc4288f 100644 (file)
@@ -145,6 +145,7 @@ static struct ci_drv controller = {
                .name   = "ci_udc",
                .ops    = &ci_udc_ops,
                .is_dualspeed = 1,
+               .max_speed = USB_SPEED_HIGH,
        },
 };
 
@@ -1015,8 +1016,6 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
                return -EINVAL;
        if (!driver->bind || !driver->setup || !driver->disconnect)
                return -EINVAL;
-       if (driver->speed != USB_SPEED_FULL && driver->speed != USB_SPEED_HIGH)
-               return -EINVAL;
 
 #if CONFIG_IS_ENABLED(DM_USB)
        ret = usb_setup_ehci_gadget(&controller.ctrl);