Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d548a617 authored by Thinh Nguyen's avatar Thinh Nguyen Committed by Felipe Balbi
Browse files

usb: dwc3: Check IP revision for GTXFIFOSIZ



DWC_usb31 controller has different GTXFIFOSIZE bit field for TXFDEF.
Check for DWC_usb31 IP revision to read the appropriate bit fields.

Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 0cab8d26
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2118,6 +2118,9 @@ static int dwc3_gadget_init_endpoints(struct dwc3 *dwc, u8 total)
			mdwidth /= 8;

			size = dwc3_readl(dwc->regs, DWC3_GTXFIFOSIZ(num));
			if (dwc3_is_usb31(dwc))
				size = DWC31_GTXFIFOSIZ_TXFDEF(size);
			else
				size = DWC3_GTXFIFOSIZ_TXFDEF(size);

			/* FIFO Depth is in MDWDITH bytes. Multiply */