diff options
| author | Marc Kleine-Budde <mkl@pengutronix.de> | 2025-08-06 19:24:12 +0300 |
|---|---|---|
| committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2025-10-08 11:18:56 +0300 |
| commit | 4942c42fe1849e6d68dfb5b36ccba344a9fac016 (patch) | |
| tree | 83c87247a9c9ae5e816d80a8f40fa7b1b582585d /drivers/cdx/controller/cdx_controller.c | |
| parent | 3d9db29b45f970d81acf61cf91a65442efbeb997 (diff) | |
| download | linux-4942c42fe1849e6d68dfb5b36ccba344a9fac016.tar.xz | |
can: m_can: m_can_chip_config(): bring up interface in correct state
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. An
external reset is not always possible, due to the shared reset with
the other CAN core. This caused the core not always be in Error Active
state when bringing up the controller.
Instead of always setting the CAN state to Error Active in
m_can_chip_config(), fix this by reading and decoding the Protocol
Status Regitser (PSR) and set the CAN state accordingly.
Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-3-682b49b49d9a@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions
