VisionFive2 U-Boot

StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   15 Branches   51 Tags
author: Minda Chen <minda.chen@starfivetech.com> 2023-08-23 09:01:28 +0800 committer: Minda Chen <minda.chen@starfivetech.com> 2023-08-23 09:01:28 +0800 commit: 0ff6454c13fdc899bf17c225953ce8990fc61117 parent: 0b2f3140a5602cc7f6555a06c8aa4723ec60e396
Commit Summary:
usb: cdns3: Set the SS EP config bit by usb SS speed
Diffstat:
1 file 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: