diff options
author | Minda Chen <minda.chen@starfivetech.com> | 2023-08-23 04:01:28 +0300 |
---|---|---|
committer | Minda Chen <minda.chen@starfivetech.com> | 2023-08-23 04:01:28 +0300 |
commit | 0ff6454c13fdc899bf17c225953ce8990fc61117 (patch) | |
tree | 4a058d5e501ec7d7da0668e99a0130a94d1d4a53 | |
parent | 0b2f3140a5602cc7f6555a06c8aa4723ec60e396 (diff) | |
download | u-boot-0ff6454c13fdc899bf17c225953ce8990fc61117.tar.xz |
usb: cdns3: Set the SS EP config bit by usb SS speed
Set SS EP config bit by USB SS speed. Avoid transfer
timeout.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
-rw-r--r-- | drivers/usb/cdns3/gadget.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c index fcaeab9cc1..0598b4c3b3 100644 --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -1569,15 +1569,17 @@ void cdns3_ep_config(struct cdns3_endpoint *priv_ep) case USB_ENDPOINT_XFER_INT: ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT); - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || - priv_dev->dev_ver > DEV_VER_V2) + if ((priv_dev->gadget.speed >= USB_SPEED_SUPER) && + ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || + priv_dev->dev_ver > DEV_VER_V2)) ep_cfg |= EP_CFG_TDL_CHK; break; case USB_ENDPOINT_XFER_BULK: ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK); - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || - priv_dev->dev_ver > DEV_VER_V2) + if ((priv_dev->gadget.speed >= USB_SPEED_SUPER) && + ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || + priv_dev->dev_ver > DEV_VER_V2)) ep_cfg |= EP_CFG_TDL_CHK; break; default: |