Skip to content

Commit eb9cf9e

Browse files
henrikbrixandersengalak
authored andcommitted
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 <[email protected]>
1 parent 18a24c3 commit eb9cf9e

File tree

3 files changed

+0
-28
lines changed

3 files changed

+0
-28
lines changed

dts/arm/nxp/nxp_k2x.dtsi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@
5252
};
5353

5454
soc {
55-
mpu: mpu@4000d000 {
56-
compatible = "nxp,k22f-mpu";
57-
reg = <0x4000d000 0x824>;
58-
59-
status = "disabled";
60-
};
61-
6255
mcg: clock-controller@40064000 {
6356
compatible = "nxp,kinetis-mcg";
6457
reg = <0x40064000 0xd>;

soc/arm/nxp_kinetis/k2x/Kconfig.series

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ config SOC_SERIES_KINETIS_K2X
1313
select CPU_CORTEX_M4
1414
select CPU_CORTEX_M_HAS_DWT
1515
select SOC_FAMILY_KINETIS
16-
select CPU_HAS_NXP_MPU
1716
select CLOCK_CONTROL
1817
help
1918
Enable support for Kinetis K2x MCU series

soc/arm/nxp_kinetis/k2x/soc.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,33 +123,13 @@ static int fsl_frdm_k22f_init(const struct device *arg)
123123
ARG_UNUSED(arg);
124124

125125
unsigned int oldLevel; /* old interrupt lock level */
126-
#if !defined(CONFIG_ARM_MPU)
127-
#if defined(SYSMPU)
128-
uint32_t temp_reg;
129-
#endif
130-
#endif /* !CONFIG_ARM_MPU */
131126

132127
/* disable interrupts */
133128
oldLevel = irq_lock();
134129

135130
/* release I/O power hold to allow normal run state */
136131
PMC->REGSC |= PMC_REGSC_ACKISO_MASK;
137132

138-
#if !defined(CONFIG_ARM_MPU)
139-
/*
140-
* Disable memory protection and clear slave port errors.
141-
* Note that the K22F does not implement the optional ARMv7-M memory
142-
* protection unit (MPU), specified by the architecture (PMSAv7), in the
143-
* Cortex-M4 core. Instead, the processor includes its own MPU module.
144-
*/
145-
#if defined(SYSMPU)
146-
temp_reg = SYSMPU->CESR;
147-
temp_reg &= ~SYSMPU_CESR_VLD_MASK;
148-
temp_reg |= SYSMPU_CESR_SPERR_MASK;
149-
SYSMPU->CESR = temp_reg;
150-
#endif
151-
#endif /* !CONFIG_ARM_MPU */
152-
153133
/* Initialize PLL/system clock to 120 MHz */
154134
clock_init();
155135

0 commit comments

Comments
 (0)