All of lore.kernel.org
 help / color / mirror / Atom feed
* [07/15] usb: dwc3: Add DWC_usb31 GTXTHRCFG reg fields
@ 2018-01-05 20:14 Thinh Nguyen
  0 siblings, 0 replies; only message in thread
From: Thinh Nguyen @ 2018-01-05 20:14 UTC (permalink / raw)
  To: Felipe Balbi, Thinh Nguyen, linux-usb; +Cc: John Youn

Add new GTXTHRCFG bit field macros for DWC_usb31. The GTXTHRCFG register
fields for DWC_usb31 is as follows:
 +-------+--------------------------+-----------------------------------+
 | BITS  | Name                     | Description                       |
 +=======+==========================+===================================+
 | 31:27 | reserved                 |                                   |
 | 26    | UsbTxPktCntSel           | Async ESS transmit packet         |
 |       |                          | threshold enable                  |
 | 25:21 | UsbTxPktCnt              | Async ESS transmit packet         |
 |       |                          | threshold count                   |
 | 20:16 | UsbMaxTxBurstSize        | Async ESS Max transmit burst size |
 | 15    | UsbTxThrNumPktSel_HS_Prd | HS high bandwidth periodic        |
 |       |                          | transmit packet threshold enable  |
 | 14:13 | UsbTxThrNumPkt_HS_Prd    | HS high bandwidth periodic        |
 |       |                          | transmit packet threshold count   |
 | 12:11 | reserved                 |                                   |
 | 10    | UsbTxThrNumPktSel_Prd    | Periodic ESS transmit packet      |
 |       |                          | threshold enable                  |
 | 9:5   | UsbTxThrNumPkt_Prd       | Periodic ESS transmit packet      |
 |       |                          | threshold count                   |
 | 4:0   | UsbMaxTxBurstSize_Prd    | Max periodic ESS TX burst size    |
 +-------+--------------------------+-----------------------------------+

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
 drivers/usb/dwc3/core.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 7c4ba7f74f27..ce10954afe49 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -181,6 +181,16 @@
 #define DWC3_USB31_RXTHRNUMPKT_PRD(n)		(((n) & 0x1f) << 5)
 #define DWC3_USB31_MAXRXBURSTSIZE_PRD(n)	((n) & 0x1f)
 
+/* Global TX Threshold Configuration Register for DWC_usb31 only */
+#define DWC3_USB31_GTXTHRCFG_MAXTXBURSTSIZE(n)	(((n) & 0x1f) << 16)
+#define DWC3_USB31_GTXTHRCFG_TXPKTCNT(n)	(((n) & 0x1f) << 21)
+#define DWC3_USB31_GTXTHRCFG_PKTCNTSEL		BIT(26)
+#define DWC3_USB31_TXTHRNUMPKTSEL_HS_PRD	BIT(15)
+#define DWC3_USB31_TXTHRNUMPKT_HS_PRD(n)	(((n) & 0x3) << 13)
+#define DWC3_USB31_TXTHRNUMPKTSEL_PRD		BIT(10)
+#define DWC3_USB31_TXTHRNUMPKT_PRD(n)		(((n) & 0x1f) << 5)
+#define DWC3_USB31_MAXTXBURSTSIZE_PRD(n)	((n) & 0x1f)
+
 /* Global Configuration Register */
 #define DWC3_GCTL_PWRDNSCALE(n)	((n) << 19)
 #define DWC3_GCTL_U2RSTECN	BIT(16)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-05 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-05 20:14 [07/15] usb: dwc3: Add DWC_usb31 GTXTHRCFG reg fields Thinh Nguyen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.