1 // SPDX-License-Identifier: GPL-2.0+
4 * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com>
9 #include <asm/armv7_mpu.h>
11 int arch_cpu_init(void)
15 struct mpu_region_config imxrt1050_region_config[] = {
16 { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
17 STRONG_ORDER, REGION_4GB },
18 { PHYS_SDRAM, REGION_1, XN_DIS, PRIV_RW_USR_RW,
19 O_I_WB_RD_WR_ALLOC, (ffs(PHYS_SDRAM_SIZE) - 2) },
21 REGION_2, XN_DIS, PRIV_RW_USR_RW,
22 STRONG_ORDER, (ffs(DMAMEM_SZ_ALL) - 2) },
26 * Configure the memory protection unit (MPU) to allow full access to
27 * the whole 4GB address space.
30 for (i = 0; i < ARRAY_SIZE(imxrt1050_region_config); i++)
31 mpu_config(&imxrt1050_region_config[i]);