diff options
author | Judith Mendez <jm@ti.com> | 2023-07-07 15:47:14 -0500 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-07-17 16:02:24 +0200 |
commit | b382380c0d2da427aaffca931e4a3b831048cace (patch) | |
tree | 4fb811bd212d47e893694f5d0d6a4b48f13cd6c3 /drivers/net/mdio | |
parent | bb410c03b999a361ab4e11e103d88707b4155bf9 (diff) |
can: m_can: Add hrtimer to generate software interrupt
Introduce timer polling method to MCAN since some SoCs may not
have M_CAN interrupt routed to A53 Linux and do not have
interrupt property in device tree M_CAN node.
On AM62x SoC, MCANs on MCU domain do not have hardware interrupt
routed to A53 Linux, instead they will use timer polling method.
Add an hrtimer to MCAN class device. Each MCAN will have its own
hrtimer instantiated if there is no hardware interrupt found in
device tree M_CAN node. The timer will generate a software
interrupt every 1 ms. In hrtimer callback, we check if there is
a transaction pending by reading a register, then process by
calling the isr if there is.
Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Verdin AM62
Reviewed-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Link: https://lore.kernel.org/all/20230707204714.62964-3-jm@ti.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/mdio')
0 files changed, 0 insertions, 0 deletions