zephyr/soc/rockchip/rk3568/mmu_regions.c

30 lines
779 B
C

/*
* Copyright 2020 NXP
* Copyright 2022 HNU-ESNL
* Copyright 2022 openEuler SIG-Zephyr
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/devicetree.h>
#include <zephyr/sys/util.h>
#include <zephyr/arch/arm64/arm_mmu.h>
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),
MT_DEVICE_nGnRnE | MT_P_RW_U_RW | MT_NS),
MMU_REGION_FLAT_ENTRY("GIC",
DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 1),
DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 1),
MT_DEVICE_nGnRnE | MT_P_RW_U_RW | MT_NS),
};
const struct arm_mmu_config mmu_config = {
.num_regions = ARRAY_SIZE(mmu_regions),
.mmu_regions = mmu_regions,
};