From 112fe8e290d9b1c8651de6c7d010041f0ff44b6d Mon Sep 17 00:00:00 2001 From: Dinh Nguyen Date: Wed, 7 May 2014 08:31:29 -0500 Subject: [PATCH] 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 Acked-by: Paul Zimmerman Reviewed-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed