rpi3: Make SHARED_RAM optional

The existing Raspberry Pi 3 port sports a number of memory regions,
which are used for several purposes. The upcoming RPi4 port will not use
all of those, so make the SHARED_RAM region optional, by only mapping it
if it has actually been defined. This helps to get a cleaner RPi4 port.

Change-Id: Id69677b7fb6ed48d9f238854b610896785db8cab
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
diff --git a/plat/rpi/common/rpi3_common.c b/plat/rpi/common/rpi3_common.c
index ac03308..ab63d98 100644
--- a/plat/rpi/common/rpi3_common.c
+++ b/plat/rpi/common/rpi3_common.c
@@ -23,9 +23,11 @@
 					DEVICE0_SIZE,			\
 					MT_DEVICE | MT_RW | MT_SECURE)
 
+#ifdef SHARED_RAM_BASE
 #define MAP_SHARED_RAM	MAP_REGION_FLAT(SHARED_RAM_BASE,		\
 					SHARED_RAM_SIZE,		\
 					MT_DEVICE | MT_RW | MT_SECURE)
+#endif
 
 #ifdef RPI3_PRELOADED_DTB_BASE
 #define MAP_NS_DTB	MAP_REGION_FLAT(RPI3_PRELOADED_DTB_BASE, 0x10000, \
@@ -54,7 +56,9 @@
  */
 #ifdef IMAGE_BL1
 static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
 	MAP_SHARED_RAM,
+#endif
 	MAP_DEVICE0,
 	MAP_FIP,
 #ifdef SPD_opteed
@@ -66,7 +70,9 @@
 
 #ifdef IMAGE_BL2
 static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
 	MAP_SHARED_RAM,
+#endif
 	MAP_DEVICE0,
 	MAP_FIP,
 	MAP_NS_DRAM0,
@@ -79,7 +85,9 @@
 
 #ifdef IMAGE_BL31
 static const mmap_region_t plat_rpi3_mmap[] = {
+#ifdef MAP_SHARED_RAM
 	MAP_SHARED_RAM,
+#endif
 	MAP_DEVICE0,
 #ifdef RPI3_PRELOADED_DTB_BASE
 	MAP_NS_DTB,