Skip to content

Commit 20694a9

Browse files
Meng Dongyangrkhuangtao
authored andcommitted
usb: dwc2: modify host_nperio_tx_fifo_size for rockchip platform
According to DWC2 datasheet, the reset value of NPTxFDep in GNPTXFSIZ register is OTG_TX_HNPERIO_DFIFO_DEPTH parameter,it specifies the Maximum Non-Periodic TxFIFO depth and the memory allocation for the host when the controller is in host mode. Software init host_nperio_tx_fifo_size with the value of NPTxFDep during dwc2 probe. But in some platform such as rk3126c, it must delay at least 100ms to wait the controller change to host mode, it will increase usb controller probe time, this patch modifies the host nperio_tx_fifo_size directly after valiate parameter to speed up boot kernel. Change-Id: Ia7d0f4f2cc1d80742d764807a8ee44cbc03c43ce Signed-off-by: Meng Dongyang <daniel.meng@rock-chips.com>
1 parent 3e2f8da commit 20694a9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/usb/dwc2/platform.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,11 @@ static int dwc2_driver_probe(struct platform_device *dev)
599599
/* Validate parameter values */
600600
dwc2_set_parameters(hsotg, params);
601601

602+
if (of_device_is_compatible(hsotg->dev->of_node,
603+
"rockchip,rk3066-usb"))
604+
hsotg->core_params->host_nperio_tx_fifo_size =
605+
params->host_nperio_tx_fifo_size;
606+
602607
dwc2_force_dr_mode(hsotg);
603608

604609
if (hsotg->dr_mode != USB_DR_MODE_HOST) {

0 commit comments

Comments
 (0)