usb: dwc3: gadget: Ignore Update Transfer cmd params
The controller doesn't check for Update Transfer command parameters DEPCMDPAR{0,1,2}. Writing to these registers is unnecessary. Ignoring this improves performance slightly by removing the register write delay. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/997d9ebf38c6bba920d4ee77bd8c77bf81978a55.1638240306.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
bc27117c7c
Коммит
a02a26eb0a
|
@ -331,9 +331,17 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd,
|
|||
}
|
||||
}
|
||||
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR0, params->param0);
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR1, params->param1);
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR2, params->param2);
|
||||
/*
|
||||
* For some commands such as Update Transfer command, DEPCMDPARn
|
||||
* registers are reserved. Since the driver often sends Update Transfer
|
||||
* command, don't write to DEPCMDPARn to avoid register write delays and
|
||||
* improve performance.
|
||||
*/
|
||||
if (DWC3_DEPCMD_CMD(cmd) != DWC3_DEPCMD_UPDATETRANSFER) {
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR0, params->param0);
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR1, params->param1);
|
||||
dwc3_writel(dep->regs, DWC3_DEPCMDPAR2, params->param2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Synopsys Databook 2.60a states in section 6.3.2.5.6 of that if we're
|
||||
|
|
Загрузка…
Ссылка в новой задаче