From 92fb8b223825bb3d8714017743c453a225eb6dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Arg=C3=BCelles?= Date: Thu, 16 Nov 2023 21:13:31 +0700 Subject: [PATCH] arm: nxp_mpu: enable module's clock only when needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NXP SYSMPU is used in other SoCs besides the Kinetis series. For devices like S32K1xx, its bus interface clock lacks of clock gating and it's driven by the system clock. Hence, only enable the module clock for the Kinetis series. Signed-off-by: Manuel Argüelles --- arch/arm/core/mpu/nxp_mpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/core/mpu/nxp_mpu.c b/arch/arm/core/mpu/nxp_mpu.c index f3d3bd715aefa8..39d7cde6f8f52c 100644 --- a/arch/arm/core/mpu/nxp_mpu.c +++ b/arch/arm/core/mpu/nxp_mpu.c @@ -37,8 +37,10 @@ static uint8_t static_regions_num; /* Global MPU configuration at system initialization. */ static void mpu_init(void) { +#if defined(CONFIG_SOC_FAMILY_KINETIS) /* Enable clock for the Memory Protection Unit (MPU). */ CLOCK_EnableClock(kCLOCK_Sysmpu0); +#endif } /**