From 49c79582f6e72638765a15becc8914b9cdafc2ee Mon Sep 17 00:00:00 2001 From: Emanuele Di Santo Date: Mon, 5 Aug 2024 14:03:15 +0200 Subject: [PATCH] soc: nordic: common: add CAN121 to nrf54hx_nrf92x_mpu_regions.c Add support for CAN121, if present in DT. Signed-off-by: Emanuele Di Santo --- soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c b/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c index a86161f3cbe..66659588411 100644 --- a/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c +++ b/soc/nordic/common/nrf54hx_nrf92x_mpu_regions.c @@ -14,6 +14,10 @@ #define CAN120_SIZE DT_REG_SIZE_BY_NAME(DT_NODELABEL(can120), message_ram) + \ DT_REG_SIZE_BY_NAME(DT_NODELABEL(can120), m_can) +#define CAN121_BASE DT_REG_ADDR_BY_NAME(DT_NODELABEL(can121), message_ram) +#define CAN121_SIZE DT_REG_SIZE_BY_NAME(DT_NODELABEL(can121), message_ram) + \ + DT_REG_SIZE_BY_NAME(DT_NODELABEL(can121), m_can) + static struct arm_mpu_region mpu_regions[] = { MPU_REGION_ENTRY("FLASH_0", CONFIG_FLASH_BASE_ADDRESS, @@ -32,6 +36,10 @@ static struct arm_mpu_region mpu_regions[] = { MPU_REGION_ENTRY("CAN120_MCAN", CAN120_BASE, REGION_RAM_NOCACHE_ATTR(CAN120_BASE, CAN120_SIZE)), #endif +#if DT_NODE_HAS_STATUS(DT_NODELABEL(can121), okay) + MPU_REGION_ENTRY("CAN121_MCAN", CAN121_BASE, + REGION_RAM_NOCACHE_ATTR(CAN121_BASE, CAN121_SIZE)), +#endif }; const struct arm_mpu_config mpu_config = {