diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2020-04-12 04:20:07 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-05-25 10:09:41 +0200 |
commit | 4244ba02edb850f880fafe178abccd9231cb0e4a (patch) | |
tree | 80ddd28d2ac213e363ca822b6bc4b7dda7f829be /drivers/usb/dwc3/core.h | |
parent | usb: dwc3: Add support for DWC_usb32 IP (diff) | |
download | linux-4244ba02edb850f880fafe178abccd9231cb0e4a.tar.xz linux-4244ba02edb850f880fafe178abccd9231cb0e4a.zip |
usb: dwc3: Get MDWIDTH for DWC_usb32
DWC_usb32 supports MDWIDTH value larger than 255 and up to 1023. The
field HWPARAMS6[9:8] stores the upper 2-bit values of the DWC_usb32's
MDWIDTH. Check that parameter and properly get the MDWIDTH for
DWC_usb32.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r-- | drivers/usb/dwc3/core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index b2903492437a..7204a838ec06 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -366,6 +366,9 @@ #define DWC3_GHWPARAMS6_SRPSUPPORT BIT(10) #define DWC3_GHWPARAMS6_EN_FPGA BIT(7) +/* DWC_usb32 only */ +#define DWC3_GHWPARAMS6_MDWIDTH(n) ((n) & (0x3 << 8)) + /* Global HWPARAMS7 Register */ #define DWC3_GHWPARAMS7_RAM1_DEPTH(n) ((n) & 0xffff) #define DWC3_GHWPARAMS7_RAM2_DEPTH(n) (((n) >> 16) & 0xffff) |