refactor(neoverse-rd): refactor nrd_soc_platform_def_v2.h file

Continuing the refactoring of the various definitions for the second
generation platforms based on the N2/V2 CPU, refactor the definitions in
the nrd_soc_platform_def_v2.h file into the following files as
appropriate.

- nrd_ros_def2.h: includes RoS hardware related definitions
- nrd_ros_fw_def2.h: includes RoS firmware related definitions
- nrd_plat_arm_def2.h: includes platform port related definitions

RoS (Rest Of System) is used to refer to the part of the reference
design platform that excludes CSS. The file inclusions in the
platform_def.h file of the platforms have been updated accordingly.

Signed-off-by: Rohit Mathew <rohit.mathew@arm.com>
Change-Id: I393e6f4a84be45f1781ea281bd55fa813803f6db
diff --git a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_plat_arm_def2.h b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_plat_arm_def2.h
index 8b009d4..a219cd7 100644
--- a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_plat_arm_def2.h
+++ b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_plat_arm_def2.h
@@ -13,6 +13,7 @@
 #ifndef NRD_PLAT_ARM_DEF2_H
 #define NRD_PLAT_ARM_DEF2_H
 
+#include <nrd_soc_css_def_v2.h>
 #include <plat/arm/common/arm_def.h>
 #include <plat/arm/common/arm_spm_def.h>
 #include <plat/arm/css/common/css_def.h>
diff --git a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_def2.h b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_def2.h
new file mode 100644
index 0000000..fc633c4
--- /dev/null
+++ b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_def2.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * This file contains the RoS specific definitions for the second generation
+ * platforms based on the N2/V2 CPU.
+ */
+
+#ifndef NRD_ROS_DEF2_H
+#define NRD_ROS_DEF2_H
+
+/*******************************************************************************
+ * SoC memory map related defines
+ ******************************************************************************/
+
+/* System Reg */
+#define CSS_SYSTEMREG_DEVICE_BASE		UL(0x0C010000)
+#define CSS_SYSTEMREG_DEVICE_SIZE		UL(0x00010000)
+
+/* NOR flash 2 */
+#define CSS_NOR2_FLASH_DEVICE_BASE		ULL(0x001054000000)
+#define CSS_NOR2_FLASH_DEVICE_SIZE		UL(0x000004000000)
+
+/* Memory controller */
+#define SOC_MEMCNTRL_BASE			UL(0x10000000)
+#define SOC_MEMCNTRL_SIZE			UL(0x10000000)
+
+#endif /* NRD_ROS_DEF2_H */
diff --git a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_fw_def2.h b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_fw_def2.h
index ffd9139..e2e3c4f 100644
--- a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_fw_def2.h
+++ b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_ros_fw_def2.h
@@ -11,6 +11,8 @@
 #ifndef NRD_ROS_FW_DEF2_H
 #define NRD_ROS_FW_DEF2_H
 
+#include <nrd_ros_def2.h>
+
 /*******************************************************************************
  * MMU mapping
  ******************************************************************************/
@@ -28,6 +30,18 @@
 			SOC_MEMCNTRL_SIZE,				\
 			MT_DEVICE | MT_RW | MT_SECURE)
 
+#define PLAT_ARM_SECURE_MAP_SYSTEMREG					\
+		MAP_REGION_FLAT(					\
+			CSS_SYSTEMREG_DEVICE_BASE,			\
+			CSS_SYSTEMREG_DEVICE_SIZE,			\
+			MT_DEVICE | MT_RW | MT_SECURE | MT_USER)
+
+#define PLAT_ARM_SECURE_MAP_NOR2					\
+		MAP_REGION_FLAT(					\
+			CSS_NOR2_FLASH_DEVICE_BASE,			\
+			CSS_NOR2_FLASH_DEVICE_SIZE,			\
+			MT_DEVICE | MT_RW | MT_SECURE | MT_USER)
+
 /*******************************************************************************
  * TZ config
  ******************************************************************************/
diff --git a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_soc_platform_def_v2.h b/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_soc_platform_def_v2.h
deleted file mode 100644
index 9101e94..0000000
--- a/plat/arm/board/neoverse_rd/common/include/nrd2/nrd_soc_platform_def_v2.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2020-2024, Arm Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef NRD_SOC_PLATFORM_DEF_V2_H
-#define NRD_SOC_PLATFORM_DEF_V2_H
-
-#include <nrd_soc_css_def_v2.h>
-
-/* Map the System registers to access from S-EL0 */
-#define CSS_SYSTEMREG_DEVICE_BASE	(0x0C010000)
-#define CSS_SYSTEMREG_DEVICE_SIZE	(0x00010000)
-#define PLAT_ARM_SECURE_MAP_SYSTEMREG	MAP_REGION_FLAT(                    \
-						CSS_SYSTEMREG_DEVICE_BASE,  \
-						CSS_SYSTEMREG_DEVICE_SIZE,  \
-						(MT_DEVICE | MT_RW |	    \
-						 MT_SECURE | MT_USER))
-
-/* Map the NOR2 Flash to access from S-EL0 */
-#define CSS_NOR2_FLASH_DEVICE_BASE	(0x001054000000)
-#define CSS_NOR2_FLASH_DEVICE_SIZE	(0x000004000000)
-#define PLAT_ARM_SECURE_MAP_NOR2	MAP_REGION_FLAT(                    \
-						CSS_NOR2_FLASH_DEVICE_BASE, \
-						CSS_NOR2_FLASH_DEVICE_SIZE, \
-						(MT_DEVICE | MT_RW |	    \
-						 MT_SECURE | MT_USER))
-
-#endif /* NRD_SOC_PLATFORM_DEF_V2_H */
diff --git a/plat/arm/board/neoverse_rd/platform/rdn2/include/platform_def.h b/plat/arm/board/neoverse_rd/platform/rdn2/include/platform_def.h
index bf6cb39..c33753f 100644
--- a/plat/arm/board/neoverse_rd/platform/rdn2/include/platform_def.h
+++ b/plat/arm/board/neoverse_rd/platform/rdn2/include/platform_def.h
@@ -13,7 +13,6 @@
 #include <nrd_plat_arm_def2.h>
 #include <nrd_ros_fw_def2.h>
 #include <nrd_sdei.h>
-#include <nrd_soc_platform_def_v2.h>
 
 /* Remote chip address offset */
 #define NRD_REMOTE_CHIP_MEM_OFFSET(n)					\
diff --git a/plat/arm/board/neoverse_rd/platform/rdn2/rdn2_plat.c b/plat/arm/board/neoverse_rd/platform/rdn2/rdn2_plat.c
index 0051049..046a82a 100644
--- a/plat/arm/board/neoverse_rd/platform/rdn2/rdn2_plat.c
+++ b/plat/arm/board/neoverse_rd/platform/rdn2/rdn2_plat.c
@@ -11,7 +11,6 @@
 #include <services/el3_spmc_ffa_memory.h>
 
 #include <nrd_plat.h>
-#include <nrd_soc_platform_def_v2.h>
 #include <rdn2_ras.h>
 
 #if defined(IMAGE_BL31)