]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
can: m_can: add support for optional reset
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 6 Aug 2025 09:38:07 +0000 (11:38 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 17 Oct 2025 07:57:13 +0000 (09:57 +0200)
commit9271d0ea07c27e6f482f20b615c2a4bba991e68c
treedbd9545ce840f4d9379669a578bc0691943e3013
parent7e0d4c111369ed385ec4aaa6c9c78c46efda54d0
can: m_can: add support for optional reset

This patch has been split from the original series [1].

In some SoCs (observed on the STM32MP15) the M_CAN IP core keeps the CAN
state and CAN error counters over an internal reset cycle. The STM32MP15
SoC provides an external reset, which is shared between both M_CAN cores.

Add support for an optional external reset. Take care of shared resets,
de-assert reset during the probe phase in m_can_class_register() and while
the interface is up, assert the reset otherwise.

[1] https://lore.kernel.org/all/20250923-m_can-fix-state-handling-v3-0-06d8baccadbf@pengutronix.de

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20251008-m_can-add-reset-v1-1-49f0bbf820c4@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c
drivers/net/can/m_can/m_can.h