linux/drivers/net/can/m_can
Judith Mendez b382380c0d 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>
2023-07-17 16:02:24 +02:00
..
Kconfig can: Kconfig: add CONFIG_CAN_RX_OFFLOAD 2022-06-11 17:11:02 +02:00
m_can_pci.c can: m_can: pci: add missing m_can_class_free_dev() in probe/remove methods 2022-11-24 16:10:18 +01:00
m_can_platform.c can: m_can: Add hrtimer to generate software interrupt 2023-07-17 16:02:24 +02:00
m_can.c can: m_can: Add hrtimer to generate software interrupt 2023-07-17 16:02:24 +02:00
m_can.h can: m_can: Add hrtimer to generate software interrupt 2023-07-17 16:02:24 +02:00
Makefile can: tcan4x5x: move regmap code into seperate file 2021-01-06 15:15:37 +01:00
tcan4x5x-core.c can: tcan4x5x: Fix use of register error status mask 2022-12-12 12:00:50 +01:00
tcan4x5x-regmap.c can: tcan4x5x: Specify separate read/write ranges 2022-12-12 12:01:01 +01:00
tcan4x5x.h can: tcan4x5x: remove duplicate include of regmap.h 2021-03-30 11:14:48 +02:00