Skip to content

Commit 763687a

Browse files
committed
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 <tony.han@microchip.com>
1 parent a28b74e commit 763687a

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

soc/microchip/sam/sama7g5/soc.c

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

18+
#define MMU_REGION_XDMAC_DEFN(idx, n) \
19+
COND_CODE_1(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+
())
23+
1824
static const struct arm_mmu_region mmu_regions[] = {
1925
MMU_REGION_FLAT_ENTRY("vectors", CONFIG_KERNEL_VM_BASE, 0x1000,
2026
MT_STRONGLY_ORDERED | MPERM_R | MPERM_X),
@@ -35,6 +41,8 @@ static const struct arm_mmu_region mmu_regions[] = {
3541

3642
MMU_REGION_FLAT_ENTRY("sckc", SCKC_BASE_ADDRESS, 0x4,
3743
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),
44+
45+
FOR_EACH_IDX(MMU_REGION_XDMAC_DEFN, (), 0, 1, 2)
3846
};
3947

4048
const struct arm_mmu_config mmu_config = {

0 commit comments

Comments
 (0)