can: tcan4x5x: Check size of mram configuration
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Fri, 28 Jul 2023 14:19:20 +0000 (16:19 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 31 Jul 2023 08:41:08 +0000 (10:41 +0200)
commitc1b17ea7dd7ca7a199d85e42fd3f8e3d46816b73
treea79636487e7a847e94d2aef1035015a79719404b
parentfbe534f7bf213d485b0ed5362b24a41bf3e18803
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>
drivers/net/can/m_can/m_can.c
drivers/net/can/m_can/m_can.h
drivers/net/can/m_can/tcan4x5x-core.c