refactor(neoverse-rd): refactor mmap macro for RoS device memory region

There are two macros that define ROS device memory map range and
attributes - one for local chip and the other for remote chip. Refactor
these two macros into a single macro that uses the chip ID to identify
the local or the remote chip.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I58eb65c2f046b6074f848f1448cd10a7dcc37f74
This commit is contained in:
Rohit Mathew 2024-03-18 18:58:40 +00:00
parent 9f1ba0af69
commit 37f59e4ea4
2 changed files with 5 additions and 11 deletions

View file

@ -38,13 +38,7 @@
SOC_SYSTEM_PERIPH_SIZE, \
MT_DEVICE | MT_RW | MT_SECURE)
#define NRD_ROS_MEMCNTRL_MMAP \
MAP_REGION_FLAT( \
SOC_MEMCNTRL_BASE, \
SOC_MEMCNTRL_SIZE, \
MT_DEVICE | MT_RW | MT_SECURE)
#define NRD_ROS_MEMCNTRL_REMOTE_CHIP_MMAP(n) \
#define NRD_ROS_MEMCNTRL_MMAP(n) \
MAP_REGION_FLAT( \
NRD_REMOTE_CHIP_MEM_OFFSET(n) + \
SOC_MEMCNTRL_BASE, \

View file

@ -40,18 +40,18 @@ const mmap_region_t plat_arm_mmap[] = {
ARM_V2M_MAP_MEM_PROTECT,
#endif
NRD_CSS_PERIPH_MMAP(0),
NRD_ROS_MEMCNTRL_MMAP,
NRD_ROS_MEMCNTRL_MMAP(0),
NRD_ROS_PLATFORM_PERIPH_MMAP,
NRD_ROS_SYSTEM_PERIPH_MMAP,
ARM_MAP_NS_DRAM1,
#if NRD_CHIP_COUNT > 1
NRD_ROS_MEMCNTRL_REMOTE_CHIP_MMAP(1),
NRD_ROS_MEMCNTRL_MMAP(1),
#endif
#if NRD_CHIP_COUNT > 2
NRD_ROS_MEMCNTRL_REMOTE_CHIP_MMAP(2),
NRD_ROS_MEMCNTRL_MMAP(2),
#endif
#if NRD_CHIP_COUNT > 3
NRD_ROS_MEMCNTRL_REMOTE_CHIP_MMAP(3),
NRD_ROS_MEMCNTRL_MMAP(3),
#endif
#if ARM_BL31_IN_DRAM
ARM_MAP_BL31_SEC_DRAM,