Skip to content

Commit cf4dbad

Browse files
committed
soc: xlnx: zynq7000: enable control register access
Enable access to the registers used to set a GEM instance's TX clock frequency. Without this memory mapping, the GEM controllers are only usable without PHY management via MDIO with a fixed TX clock frequency set by the FSBL. If MDIO and PHY management are enabled for either GEM on the Zynq, the system will crash with a data abort without this mapping. The ZynqMP is not affected by this issue, as even with the MPU enabled, the relevant SLCR register space is covered by the "peripherals" mapping entry in the ZynqMP's MPU region table. Signed-off-by: Immo Birnbaum <mail@birnbaum.immo>
1 parent ff7fc31 commit cf4dbad

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

soc/xlnx/zynq7000/xc7zxxx/soc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ static const struct arm_mmu_region mmu_regions[] = {
3939
/* ARM Arch timer, GIC are covered by the MPCore mapping */
4040

4141
/* GEMs */
42+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0)) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem1))
43+
MMU_REGION_FLAT_ENTRY("slcr",
44+
0xF8000000,
45+
0x1000,
46+
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),
47+
#endif
4248
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0))
4349
MMU_REGION_FLAT_ENTRY("gem0",
4450
DT_REG_ADDR(DT_NODELABEL(gem0)),

soc/xlnx/zynq7000/xc7zxxxs/soc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ static const struct arm_mmu_region mmu_regions[] = {
3939
/* ARM Arch timer, GIC are covered by the MPCore mapping */
4040

4141
/* GEMs */
42+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0)) || DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem1))
43+
MMU_REGION_FLAT_ENTRY("slcr",
44+
0xF8000000,
45+
0x1000,
46+
MT_STRONGLY_ORDERED | MPERM_R | MPERM_W),
47+
#endif
4248
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gem0))
4349
MMU_REGION_FLAT_ENTRY("gem0",
4450
DT_REG_ADDR(DT_NODELABEL(gem0)),

0 commit comments

Comments
 (0)