Skip to content

Commit 5fa0898

Browse files
TonyHan11dkalowsk
authored andcommitted
soc: microchip: sam: update MMU for sama7g5 FLEXCOM
When the FLEXCOM is activated in the DT, configure it's register region with strong ordered, read and write access. Signed-off-by: Tony Han <tony.han@microchip.com>
1 parent 256031e commit 5fa0898

File tree

1 file changed

+7
-2
lines changed
  • soc/microchip/sam/sama7g5

1 file changed

+7
-2
lines changed

soc/microchip/sam/sama7g5/soc.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@
99
#include <zephyr/arch/arm/mmu/arm_mmu.h>
1010
#include <zephyr/kernel.h>
1111

12+
#define MMU_REGION_FLEXCOM_DEFN(idx, n) \
13+
COND_CODE_1(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(flx##n)), \
14+
(MMU_REGION_FLAT_ENTRY("flexcom"#n, FLEXCOM##n##_BASE_ADDRESS, 0x4000, \
15+
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),), \
16+
())
17+
1218
static const struct arm_mmu_region mmu_regions[] = {
1319
MMU_REGION_FLAT_ENTRY("vectors", CONFIG_KERNEL_VM_BASE, 0x1000,
1420
MT_STRONGLY_ORDERED | MPERM_R | MPERM_X),
1521

16-
MMU_REGION_FLAT_ENTRY("flexcom3", FLEXCOM3_BASE_ADDRESS, 0x4000,
17-
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),
22+
FOR_EACH_IDX(MMU_REGION_FLEXCOM_DEFN, (), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
1823

1924
MMU_REGION_FLAT_ENTRY("gic", GIC_DISTRIBUTOR_BASE, 0x1100,
2025
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),

0 commit comments

Comments
 (0)