mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 15:26:03 +09:00
arm: imxrt: soc: make mpu regions generic
This mpu handling works for every i.MXRT SoC that we have, so let's generalize imxrt1050_region_config to imxrt_region_config. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
This commit is contained in:
parent
cb26d5a926
commit
55ad612306
|
@ -14,7 +14,7 @@ int arch_cpu_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
struct mpu_region_config imxrt1050_region_config[] = {
|
struct mpu_region_config imxrt_region_config[] = {
|
||||||
{ 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
|
{ 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
|
||||||
STRONG_ORDER, REGION_4GB },
|
STRONG_ORDER, REGION_4GB },
|
||||||
{ PHYS_SDRAM, REGION_1, XN_DIS, PRIV_RW_USR_RW,
|
{ PHYS_SDRAM, REGION_1, XN_DIS, PRIV_RW_USR_RW,
|
||||||
|
@ -29,8 +29,8 @@ int arch_cpu_init(void)
|
||||||
* the whole 4GB address space.
|
* the whole 4GB address space.
|
||||||
*/
|
*/
|
||||||
disable_mpu();
|
disable_mpu();
|
||||||
for (i = 0; i < ARRAY_SIZE(imxrt1050_region_config); i++)
|
for (i = 0; i < ARRAY_SIZE(imxrt_region_config); i++)
|
||||||
mpu_config(&imxrt1050_region_config[i]);
|
mpu_config(&imxrt_region_config[i]);
|
||||||
enable_mpu();
|
enable_mpu();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user