diff options
author | Tom Rini | 2023-07-27 10:35:36 -0400 |
---|---|---|
committer | Tom Rini | 2023-07-27 10:35:36 -0400 |
commit | c98c401dfb485b39c7453a4147b17cd4b8d10c67 (patch) | |
tree | 3478616f8f7cd1e085ba84230dbf1d24a5159e5f /drivers | |
parent | 197aa22e6506f2f7043c16cf2b0a412a31dd088d (diff) | |
parent | 3aba92c9dd2302a91b56d49791041766dcc7dfeb (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-usb
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/cdns3/gadget.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-mx6.c | 16 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 1 |
3 files changed, 4 insertions, 17 deletions
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index fcaeab9cc1d..cae570cf598 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -82,6 +82,9 @@ static int __cdns3_gadget_ep_queue(struct usb_ep *ep, struct usb_request *request, gfp_t gfp_flags); +static void cdns3_gadget_udc_set_speed(struct usb_gadget *gadget, + enum usb_device_speed speed); + /** * cdns3_set_register_bit - set bit in given register. * @ptr: address of device controller register to be read and changed @@ -2341,6 +2344,7 @@ static int cdns3_gadget_udc_start(struct usb_gadget *gadget, spin_lock_irqsave(&priv_dev->lock, flags); priv_dev->gadget_driver = driver; + cdns3_gadget_udc_set_speed(gadget, gadget->max_speed); cdns3_gadget_config(priv_dev); spin_unlock_irqrestore(&priv_dev->lock, flags); return 0; diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index fae20838c60..a9ed5e7a0d5 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -709,18 +709,6 @@ static int ehci_usb_probe(struct udevice *dev) goto err_regulator; #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) - if (priv->vbus_supply) { - ret = regulator_set_enable(priv->vbus_supply, - (type == USB_INIT_DEVICE) ? - false : true); - if (ret && ret != -ENOSYS) { - printf("Error enabling VBUS supply (ret=%i)\n", ret); - goto err_clk; - } - } -#endif - if (priv->init_type == USB_INIT_HOST) { setbits_le32(&ehci->usbmode, CM_HOST); writel(mx6_portsc(priv->phy_type), &ehci->portsc); @@ -744,10 +732,6 @@ err_phy: generic_shutdown_phy(&priv->phy); err_regulator: #endif -#if CONFIG_IS_ENABLED(DM_REGULATOR) - if (priv->vbus_supply) - regulator_set_enable(priv->vbus_supply, false); -#endif err_clk: #if CONFIG_IS_ENABLED(CLK) clk_disable(&priv->clk); diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 9e33c5d8559..5cacf0769ec 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1418,7 +1418,6 @@ int xhci_register(struct udevice *dev, struct xhci_hccr *hccr, return 0; err: - free(ctrl); debug("%s: failed, ret=%d\n", __func__, ret); return ret; } |