Skip to content

Commit 7715e14

Browse files
TonyHan11jhedberg
authored andcommitted
soc: microchip: sam: update MMU for sama7g5 XDMAC
When the XDMAC is activated in the DT, configure it's register region with strong ordered, read and write access. Signed-off-by: Tony Han <[email protected]>
1 parent 0f8698c commit 7715e14

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

soc/microchip/sam/sama7g5/soc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),), \
1616
())
1717

18+
#define MMU_REGION_XDMAC_DEFN(idx, n) \
19+
IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dma##n)), \
20+
(MMU_REGION_FLAT_ENTRY("xdmac"#n, XDMAC##n##_BASE_ADDRESS, 0x4000, \
21+
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),))
22+
1823
static const struct arm_mmu_region mmu_regions[] = {
1924
MMU_REGION_FLAT_ENTRY("vectors", CONFIG_KERNEL_VM_BASE, 0x1000,
2025
MT_STRONGLY_ORDERED | MPERM_R | MPERM_X),
@@ -49,6 +54,8 @@ static const struct arm_mmu_region mmu_regions[] = {
4954
IF_ENABLED(DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(trng)),
5055
(MMU_REGION_FLAT_ENTRY("trng", TRNG_BASE_ADDRESS, 0x100,
5156
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),))
57+
58+
FOR_EACH_IDX(MMU_REGION_XDMAC_DEFN, (), 0, 1, 2)
5259
};
5360

5461
const struct arm_mmu_config mmu_config = {

0 commit comments

Comments
 (0)