From 1b2e6aadd96d5da588727edf1bbcbfdee5115583 Mon Sep 17 00:00:00 2001 From: William Wu Date: Mon, 1 Apr 2019 15:16:53 +0800 Subject: [PATCH] Revert "usb: dwc_otg_310: resize the depth of TxFIFO number 1 and 2" This reverts commit 987105c1ff12b781c3240f826bb5f9709e987c05. According to DWC2 Programmer's Guide, 2.1.1.2 Dedicated TxFIFO Operation, more space allocated in the transmit IN Endpoint FIFO results in a better performance on the USB and can hide latencies on the AHB. So this patch sets the depth of TxFIFO number 1 to 1024 Bytes which is usually used for primary USB function (e.g MTP). Test on RK3288 EVB Android P: Without this patch: MTP over eMMC - Read is only 9.48 MBps With this patch: MTP over eMMC - Read is 28.4 MB/s Side effect of this patch, if the user uses UVC function, it need to change the depth of TxFIFO number 1 to 512 Bytes (used for UVC control ep), and change the depth of TxFIFO number 2 to 1024 Bytes (used for UVC stream ep). The dwc_otg_310 driver has provided module_param to set the depth of TxFIFO for each number. You can set the depth of TxFIFO number 1 in cmdline like this: dwc_otg.dev_tx_fifo_size_1=0x80,dwc_otg.dev_tx_fifo_size_2=0x100 Change-Id: I7cebf112731e43f89994b92729bf2a3f9e54e8dc Signed-off-by: William Wu --- drivers/usb/dwc_otg_310/dwc_otg_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_driver.c b/drivers/usb/dwc_otg_310/dwc_otg_driver.c index 7bcf93dbe905..78c3094aecae 100644 --- a/drivers/usb/dwc_otg_310/dwc_otg_driver.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_driver.c @@ -183,9 +183,9 @@ static struct dwc_otg_driver_module_params dwc_otg_module_params = { .en_multiple_tx_fifo = -1, .dev_tx_fifo_size = { /* dev_tx_fifo_size */ - 0x80, 0x100, 0x80, + 0x80, 0x60, 0x10, 0x10,