2020-11-03 11:44:18 +08:00
|
|
|
/*
|
2022-08-17 16:56:07 +08:00
|
|
|
* Copyright 2020-2022 NXP
|
2020-11-03 11:44:18 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 17:11:04 +08:00
|
|
|
#include <zephyr/arch/arm64/arm_mmu.h>
|
2022-05-31 22:58:55 +08:00
|
|
|
#include <zephyr/devicetree.h>
|
|
|
|
#include <zephyr/sys/util.h>
|
2020-11-03 11:44:18 +08:00
|
|
|
|
|
|
|
static const struct arm_mmu_region mmu_regions[] = {
|
|
|
|
|
|
|
|
MMU_REGION_FLAT_ENTRY("GIC",
|
|
|
|
DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 0),
|
|
|
|
DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 0),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
|
2020-11-03 11:44:18 +08:00
|
|
|
|
|
|
|
MMU_REGION_FLAT_ENTRY("GIC",
|
|
|
|
DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 1),
|
|
|
|
DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 1),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
|
2020-11-03 11:44:18 +08:00
|
|
|
|
|
|
|
MMU_REGION_FLAT_ENTRY("CCM",
|
|
|
|
DT_REG_ADDR(DT_NODELABEL(ccm)),
|
|
|
|
DT_REG_SIZE(DT_NODELABEL(ccm)),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
|
2020-11-03 11:44:18 +08:00
|
|
|
|
|
|
|
MMU_REGION_FLAT_ENTRY("ANA_PLL",
|
|
|
|
DT_REG_ADDR(DT_NODELABEL(ana_pll)),
|
|
|
|
DT_REG_SIZE(DT_NODELABEL(ana_pll)),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
|
2020-11-03 11:44:18 +08:00
|
|
|
|
2022-08-17 16:56:07 +08:00
|
|
|
MMU_REGION_FLAT_ENTRY("IOMUXC",
|
|
|
|
DT_REG_ADDR(DT_NODELABEL(iomuxc)),
|
|
|
|
DT_REG_SIZE(DT_NODELABEL(iomuxc)),
|
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
|
2023-12-08 13:50:27 +08:00
|
|
|
|
|
|
|
MMU_REGION_DT_COMPAT_FOREACH_FLAT_ENTRY(nxp_imx_iuart,
|
|
|
|
(MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS))
|
2020-11-03 11:44:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
const struct arm_mmu_config mmu_config = {
|
|
|
|
.num_regions = ARRAY_SIZE(mmu_regions),
|
|
|
|
.mmu_regions = mmu_regions,
|
|
|
|
};
|