]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: Add function to calculate correct FIFO sizes
authorDinh Nguyen <dinguyen@altera.com>
Wed, 7 May 2014 13:31:29 +0000 (08:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 22:42:42 +0000 (15:42 -0700)
commit535c8584f31824e9ae9e0a95aa3e52700c0e851e
treee5d2d73ec5b5e1497ec56d8944f6e6f03caac9d5
parent5eb265425f4e91e7c2c3176e04a19eed67298e0b
usb: dwc2: Add function to calculate correct FIFO sizes

The dwc2 IP on the SOCFPGA cannot use the default HW configured
FIFO sizes. The total FIFO depth as read from GHWCFG3 reports 0x1f80 or 8064
32-bit words. But the GRXFSIZ, GNPTXFSIZ, and HPTXFSIZ register defaults
to 0x2000 or 8192 32-bit words. So the driver cannot just use the fifo sizes
as read from those registers.

For platforms that face the same issue, this commits sets the RX, periodic TX,
and non-periodic TX fifo size to those that are recommended v2.93a spec for
the DWC2 IP. Implements Method #2 from the Synopsys v2.93a spec for the DWC2.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/core.c