Skip to content

Commit 86d68e1

Browse files
ibirnbaumfabiobaltieri
authored andcommitted
soc: arm: xilinx_zynq7000: add MMU PTEs for all AXI GPIO IP core instances
add the MMU page table entries for all instances of the Xilinx AXI GPIO controller IP core. Other than any Zynq-7000 peripheral supported so far, the existance of 1..n instances of the IP core within the FPGA part of the SoC is optional. Therefore, other than addressing instances of supported peripherals using their DT node label as has always been the case so far, the data for the MMU page table is added using the DT_FOREACH_STATUS_OKAY macro. Signed-off-by: Immo Birnbaum <[email protected]>
1 parent 6fe1299 commit 86d68e1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

soc/arm/xilinx_zynq7000/xc7zxxx/soc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
/* System Level Control Registers (SLCR) */
1616
#define SLCR_UNLOCK 0x0008
1717
#define SLCR_UNLOCK_KEY 0xdf0d
18+
#define AXI_GPIO_MMU_ENTRY(id)\
19+
MMU_REGION_FLAT_ENTRY("axigpio",\
20+
DT_REG_ADDR(id),\
21+
DT_REG_SIZE(id),\
22+
MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W),
1823

1924
static const struct arm_mmu_region mmu_regions[] = {
2025

@@ -68,6 +73,8 @@ static const struct arm_mmu_region mmu_regions[] = {
6873
MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W),
6974
#endif
7075

76+
DT_FOREACH_STATUS_OKAY(xlnx_xps_gpio_1_00_a, AXI_GPIO_MMU_ENTRY)
77+
7178
};
7279

7380
const struct arm_mmu_config mmu_config = {

soc/arm/xilinx_zynq7000/xc7zxxxs/soc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
/* System Level Configuration Registers */
1616
#define SLCR_UNLOCK 0x0008
1717
#define SLCR_UNLOCK_KEY 0xdf0d
18+
#define AXI_GPIO_MMU_ENTRY(id)\
19+
MMU_REGION_FLAT_ENTRY("axigpio",\
20+
DT_REG_ADDR(id),\
21+
DT_REG_SIZE(id),\
22+
MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W),
1823

1924
static const struct arm_mmu_region mmu_regions[] = {
2025

@@ -68,6 +73,8 @@ static const struct arm_mmu_region mmu_regions[] = {
6873
MT_DEVICE | MATTR_SHARED | MPERM_R | MPERM_W),
6974
#endif
7075

76+
DT_FOREACH_STATUS_OKAY(xlnx_xps_gpio_1_00_a, AXI_GPIO_MMU_ENTRY)
77+
7178
};
7279

7380
const struct arm_mmu_config mmu_config = {

0 commit comments

Comments
 (0)