arch: nxp_kinetis: Remove HAS_SYSMPU option.

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 <piotr.ziecik@nordicsemi.no>
This commit is contained in:
Piotr Zięcik 2018-09-17 14:58:21 +02:00 committed by Carles Cufí
commit d9cc147c60
4 changed files with 6 additions and 13 deletions

View file

@ -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

View file

@ -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

View file

@ -3,6 +3,6 @@ zephyr_sources(
wdog.S
)
zephyr_sources_ifdef(
CONFIG_HAS_SYSMPU
CONFIG_NXP_MPU
nxp_mpu_regions.c
)

View file

@ -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();