From d9cc147c606a8ad3036f46b9016e7df1f63efc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Zi=C4=99cik?= Date: Mon, 17 Sep 2018 14:58:21 +0200 Subject: [PATCH] arch: nxp_kinetis: Remove HAS_SYSMPU option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The HAS_SYSMPU option is just selecting NXP_MPU option, which could be also controlled through menuconfig. This commit removes the HAS_SYSMPU option and replaces its usage by NXP_MPU option. Signed-off-by: Piotr Zięcik --- boards/arm/frdm_k64f/frdm_k64f_defconfig | 2 +- soc/arm/nxp_kinetis/Kconfig | 7 ------- soc/arm/nxp_kinetis/k6x/CMakeLists.txt | 2 +- soc/arm/nxp_kinetis/k6x/soc.c | 8 ++++---- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/boards/arm/frdm_k64f/frdm_k64f_defconfig b/boards/arm/frdm_k64f/frdm_k64f_defconfig index 9f4a85088a3..0d34a9b000f 100644 --- a/boards/arm/frdm_k64f/frdm_k64f_defconfig +++ b/boards/arm/frdm_k64f/frdm_k64f_defconfig @@ -12,4 +12,4 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000 CONFIG_OSC_EXTERNAL=y # Enable MPU -CONFIG_HAS_SYSMPU=y +CONFIG_NXP_MPU=y diff --git a/soc/arm/nxp_kinetis/Kconfig b/soc/arm/nxp_kinetis/Kconfig index 245dfff4624..8cc7d03ac19 100644 --- a/soc/arm/nxp_kinetis/Kconfig +++ b/soc/arm/nxp_kinetis/Kconfig @@ -37,13 +37,6 @@ config HAS_MCG help Set if the multipurpose clock generator (MCG) module is present in the SoC. -config HAS_SYSMPU - bool "Enable MPU on NXP Kinetis" - depends on CPU_HAS_MPU - select NXP_MPU - help - Enable MPU support on NXP Kinetis SoCs - if HAS_OSC choice diff --git a/soc/arm/nxp_kinetis/k6x/CMakeLists.txt b/soc/arm/nxp_kinetis/k6x/CMakeLists.txt index 89f30153f9e..9083d2be52d 100644 --- a/soc/arm/nxp_kinetis/k6x/CMakeLists.txt +++ b/soc/arm/nxp_kinetis/k6x/CMakeLists.txt @@ -3,6 +3,6 @@ zephyr_sources( wdog.S ) zephyr_sources_ifdef( - CONFIG_HAS_SYSMPU + CONFIG_NXP_MPU nxp_mpu_regions.c ) diff --git a/soc/arm/nxp_kinetis/k6x/soc.c b/soc/arm/nxp_kinetis/k6x/soc.c index 4ddf8013188..160beb7a8f3 100644 --- a/soc/arm/nxp_kinetis/k6x/soc.c +++ b/soc/arm/nxp_kinetis/k6x/soc.c @@ -157,9 +157,9 @@ static int fsl_frdm_k64f_init(struct device *arg) ARG_UNUSED(arg); unsigned int oldLevel; /* old interrupt lock level */ -#if !defined(CONFIG_HAS_SYSMPU) +#if !defined(CONFIG_NXP_MPU) u32_t temp_reg; -#endif /* !CONFIG_HAS_SYSMPU */ +#endif /* !CONFIG_NXP_MPU */ /* disable interrupts */ oldLevel = irq_lock(); @@ -167,7 +167,7 @@ static int fsl_frdm_k64f_init(struct device *arg) /* release I/O power hold to allow normal run state */ PMC->REGSC |= PMC_REGSC_ACKISO_MASK; -#if !defined(CONFIG_HAS_SYSMPU) +#if !defined(CONFIG_NXP_MPU) /* * Disable memory protection and clear slave port errors. * Note that the K64F does not implement the optional ARMv7-M memory @@ -178,7 +178,7 @@ static int fsl_frdm_k64f_init(struct device *arg) temp_reg &= ~SYSMPU_CESR_VLD_MASK; temp_reg |= SYSMPU_CESR_SPERR_MASK; SYSMPU->CESR = temp_reg; -#endif /* !CONFIG_HAS_SYSMPU */ +#endif /* !CONFIG_NXP_MPU */ _ClearFaults();