diff options
author | Markus Schneider-Pargmann <msp@baylibre.com> | 2022-12-06 14:57:18 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-12-12 13:58:32 +0300 |
commit | c1eaf8b9bd3145d029446c927e1c9ce925dfe6a7 (patch) | |
tree | ef14bed40800de7123fcf4e3623b1f36e83397f7 /drivers/net/can/m_can/tcan4x5x.h | |
parent | 3abcc01c38bc5d424635df96e0677e2fbec021de (diff) | |
download | linux-c1eaf8b9bd3145d029446c927e1c9ce925dfe6a7.tar.xz |
can: m_can: Eliminate double read of TXFQS in tx_handler
The TXFQS register is read first to check if the fifo is full and then
immediately again to get the putidx. This is unnecessary and adds
significant overhead if read requests are done over a slow bus, for
example SPI with tcan4x5x.
Add a variable to store the value of the register. Split the
m_can_tx_fifo_full function into two to avoid the hidden m_can_read call
if not needed.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20221206115728.1056014-2-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/m_can/tcan4x5x.h')
0 files changed, 0 insertions, 0 deletions