soc: arm: nxp: kinetis: k2x: remove MPU support

Remove (disabled) MPU support for the NXP Kinetis K2x. At least the
MK22F51212, which is the only K2x supported by Zephyr so far, does not
contain an MPU.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2021-05-04 13:03:18 +02:00 committed by Kumar Gala
commit eb9cf9e0dc
3 changed files with 0 additions and 28 deletions

View file

@ -52,13 +52,6 @@
};
soc {
mpu: mpu@4000d000 {
compatible = "nxp,k22f-mpu";
reg = <0x4000d000 0x824>;
status = "disabled";
};
mcg: clock-controller@40064000 {
compatible = "nxp,kinetis-mcg";
reg = <0x40064000 0xd>;

View file

@ -13,7 +13,6 @@ config SOC_SERIES_KINETIS_K2X
select CPU_CORTEX_M4
select CPU_CORTEX_M_HAS_DWT
select SOC_FAMILY_KINETIS
select CPU_HAS_NXP_MPU
select CLOCK_CONTROL
help
Enable support for Kinetis K2x MCU series

View file

@ -123,11 +123,6 @@ static int fsl_frdm_k22f_init(const struct device *arg)
ARG_UNUSED(arg);
unsigned int oldLevel; /* old interrupt lock level */
#if !defined(CONFIG_ARM_MPU)
#if defined(SYSMPU)
uint32_t temp_reg;
#endif
#endif /* !CONFIG_ARM_MPU */
/* disable interrupts */
oldLevel = irq_lock();
@ -135,21 +130,6 @@ static int fsl_frdm_k22f_init(const struct device *arg)
/* release I/O power hold to allow normal run state */
PMC->REGSC |= PMC_REGSC_ACKISO_MASK;
#if !defined(CONFIG_ARM_MPU)
/*
* Disable memory protection and clear slave port errors.
* Note that the K22F does not implement the optional ARMv7-M memory
* protection unit (MPU), specified by the architecture (PMSAv7), in the
* Cortex-M4 core. Instead, the processor includes its own MPU module.
*/
#if defined(SYSMPU)
temp_reg = SYSMPU->CESR;
temp_reg &= ~SYSMPU_CESR_VLD_MASK;
temp_reg |= SYSMPU_CESR_SPERR_MASK;
SYSMPU->CESR = temp_reg;
#endif
#endif /* !CONFIG_ARM_MPU */
/* Initialize PLL/system clock to 120 MHz */
clock_init();