• Yu Chen's avatar
    usb: dwc3: Increase timeout for CmdAct cleared by device controller · 1c0e69ae
    Yu Chen authored
    If the SS PHY is in P3, there is no pipe_clk, HW may use suspend_clk
    for function, as suspend_clk is slow so EP command need more time to
    complete, e.g, imx8M suspend_clk is 32K, set ep configuration will
    take about 380us per below trace time stamp(44.286278 - 44.285897
    = 0.000381):
    
    configfs_acm.sh-822   [000] d..1    44.285896: dwc3_writel: addr
    000000006d59aae1 value 00000401
    configfs_acm.sh-822   [000] d..1    44.285897: dwc3_readl: addr
    000000006d59aae1 value 00000401
    ... ...
    configfs_acm.sh-822   [000] d..1    44.286278: dwc3_readl: addr
    000000006d59aae1 value 00000001
    configfs_acm.sh-822   [000] d..1    44.286279: dwc3_gadget_ep_cmd:
    ep0out: cmd 'Set Endpoint Configuration' [401] params 00001000
    00000500 00000000 --> status: Successful
    
    This was originally found on Hisilicon Kirin Soc that need more time
    for the device controller to clear the CmdAct of DEPCMD.
    Signed-off-by: default avatarYu Chen <chenyu56@huawei.com>
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
    1c0e69ae
gadget.c 95.5 KB