diff options
author | Meng Dongyang <daniel.meng@rock-chips.com> | 2017-12-11 18:56:25 +0800 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2017-12-12 20:10:13 +0800 |
commit | 20694a9e4bb4e336f50fdae20c22786e24e72808 (patch) | |
tree | e9d86a4a53f4d5084b2ebc6436537ebb1cd014b8 | |
parent | 3e2f8da1041ae299c162399f98e74ec63eda0cc1 (diff) |
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>
-rw-r--r-- | drivers/usb/dwc2/platform.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 91f0a129e152..6109888aca53 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -599,6 +599,11 @@ static int dwc2_driver_probe(struct platform_device *dev) /* Validate parameter values */ dwc2_set_parameters(hsotg, params); + if (of_device_is_compatible(hsotg->dev->of_node, + "rockchip,rk3066-usb")) + hsotg->core_params->host_nperio_tx_fifo_size = + params->host_nperio_tx_fifo_size; + dwc2_force_dr_mode(hsotg); if (hsotg->dr_mode != USB_DR_MODE_HOST) { |