usb: dwc3: gadget: Skip reading GEVNTSIZn
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Tue, 30 Nov 2021 02:53:22 +0000 (18:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Dec 2021 11:02:49 +0000 (12:02 +0100)
commit76c4c95dac0da03f64d8b59a8834faf8020af8dc
tree23a86e104967a36294b664f9803b4cd4cb97f3cb
parenta02a26eb0aeaa2859a8b2f182bd5b5f7228ee1fe
usb: dwc3: gadget: Skip reading GEVNTSIZn

The driver knows what it needs to set for GEVNTSIZn, and the controller
doesn't modify this register unless there's a hard reset. To save a few
microseconds of register read in read-modify-write operation, simply do
register write with the expected values. This can improve performance
when there are many interrupts generated, which the driver needs to
check and handle.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/efddf4ee5821c4bc5ae7ad90d629ec7a0ebcbf9a.1638240306.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c