summaryrefslogtreecommitdiff
path: root/drivers/net/can/m_can/m_can.h
diff options
context:
space:
mode:
authorMarkus Schneider-Pargmann <msp@baylibre.com>2024-02-07 12:32:15 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2024-02-12 19:02:44 +0300
commit80c5bac02a820dc569e38e102456ec4b34f6f607 (patch)
treee63c6271c5b1ec4c3f7064a2ca1c3247113196b9 /drivers/net/can/m_can/m_can.h
parent14f0a0a4407ebb6f36eb7d394d497d4632c654dc (diff)
downloadlinux-80c5bac02a820dc569e38e102456ec4b34f6f607.tar.xz
can: m_can: Cache tx putidx
m_can_tx_handler is the only place where data is written to the tx fifo. We can calculate the putidx in the driver code here to avoid the dependency on the txfqs register. Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/all/20240207093220.2681425-10-msp@baylibre.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/m_can/m_can.h')
-rw-r--r--drivers/net/can/m_can/m_can.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
index 1e461d305bce..0de42fc5ef1e 100644
--- a/drivers/net/can/m_can/m_can.h
+++ b/drivers/net/can/m_can/m_can.h
@@ -101,6 +101,9 @@ struct m_can_classdev {
u32 tx_max_coalesced_frames_irq;
u32 tx_coalesce_usecs_irq;
+ // Store this internally to avoid fetch delays on peripheral chips
+ int tx_fifo_putidx;
+
struct mram_cfg mcfg[MRAM_CFG_NUM];
struct hrtimer hrtimer;