usb: dwc2: gadget: Set TX FIFO depths to calculated defaults
authorSevak Arakelyan <sevaka@synopsys.com>
Mon, 23 Jan 2017 23:01:23 +0000 (15:01 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 24 Jan 2017 14:19:11 +0000 (16:19 +0200)
commitc138ecfa6108edee17fabfa56285b00f66641659
treec7e467bba6576b96808dfddfeee77e8f66bd80d4
parente1f411d1b3db49a2089f47087410dcfec6564e28
usb: dwc2: gadget: Set TX FIFO depths to calculated defaults

Remove legacy DWC2_G_P_LEGACY_TX_FIFO_SIZE array for TX FIFOs.
Update dwc2_set_param_tx_fifo_sizes function to calculate
and assign default average FIFO depth to each member of
g_tx_fifo_size array. Total FIFO size, EP Info block's size,
FIFO operation mode and device operation mode are taken into
consideration during the calculation.

Cc: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Sevak Arakelyan <sevaka@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/params.c