diff options
author | Markus Schneider-Pargmann <msp@baylibre.com> | 2023-07-28 16:19:20 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2023-07-31 10:41:08 +0200 |
commit | c1b17ea7dd7ca7a199d85e42fd3f8e3d46816b73 (patch) | |
tree | a79636487e7a847e94d2aef1035015a79719404b /drivers/net/can/m_can/m_can.h | |
parent | fbe534f7bf213d485b0ed5362b24a41bf3e18803 (diff) |
can: tcan4x5x: Check size of mram configuration
To reduce debugging effort in case the mram is misconfigured, add this
size check of the DT configuration. Currently if the mram configuration
doesn't fit into the available MRAM it just overwrites other areas of
the MRAM.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Link: https://lore.kernel.org/all/20230728141923.162477-4-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h index c543928c756f..520e14277dff 100644 --- a/drivers/net/can/m_can/m_can.h +++ b/drivers/net/can/m_can/m_can.h @@ -103,6 +103,7 @@ int m_can_class_register(struct m_can_classdev *cdev); void m_can_class_unregister(struct m_can_classdev *cdev); int m_can_class_get_clocks(struct m_can_classdev *cdev); int m_can_init_ram(struct m_can_classdev *priv); +int m_can_check_mram_cfg(struct m_can_classdev *cdev, u32 mram_max_size); int m_can_class_suspend(struct device *dev); int m_can_class_resume(struct device *dev); |