diff options
author | Tom Rini <trini@konsulko.com> | 2020-01-15 09:22:15 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-01-15 09:22:15 -0500 |
commit | fb537657d9e94a8d489eb9463451e9cf90cbe973 (patch) | |
tree | 17a2b750de2caee4b9d3da009da85037b410c126 /arch/arm/mach-imx/imxrt/soc.c | |
parent | 59612e4f24d2ee120c4e20d42fa23ba8e3574c51 (diff) | |
parent | 8d9c0762a8cf0a5027e7cd3c6794693f2d64d007 (diff) |
Merge tag 'u-boot-imx-20200115' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
-----------------------------------
- imx8:
add capricorn giedi deneb boards
- imx6:
fixed fow wandboard
- imx7: DM_ETHER for pico-imx7d
- fsl_esdhc_imx: add broken-cd property
- New SOC: IMXRT10xx
Travis:
https://travis-ci.org/sbabic/u-boot-imx/builds/637126531
Diffstat (limited to 'arch/arm/mach-imx/imxrt/soc.c')
-rw-r--r-- | arch/arm/mach-imx/imxrt/soc.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imxrt/soc.c b/arch/arm/mach-imx/imxrt/soc.c new file mode 100644 index 0000000000..e1eea23035 --- /dev/null +++ b/arch/arm/mach-imx/imxrt/soc.c @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 + * Author(s): Giulio Benetti <giulio.benetti@benettiengineering.com> + */ + +#include <common.h> +#include <asm/io.h> +#include <asm/armv7_mpu.h> + +int arch_cpu_init(void) +{ + int i; + + struct mpu_region_config imxrt1050_region_config[] = { + { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, + STRONG_ORDER, REGION_4GB }, + { PHYS_SDRAM, REGION_1, XN_DIS, PRIV_RW_USR_RW, + O_I_WB_RD_WR_ALLOC, (ffs(PHYS_SDRAM_SIZE) - 2) }, + { DMAMEM_BASE, + REGION_2, XN_DIS, PRIV_RW_USR_RW, + STRONG_ORDER, (ffs(DMAMEM_SZ_ALL) - 2) }, + }; + + /* + * Configure the memory protection unit (MPU) to allow full access to + * the whole 4GB address space. + */ + disable_mpu(); + for (i = 0; i < ARRAY_SIZE(imxrt1050_region_config); i++) + mpu_config(&imxrt1050_region_config[i]); + enable_mpu(); + + return 0; +} |