Replace all SCP FW (BL0, BL3-0) references

This patch replaces all references to the SCP Firmware (BL0, BL30,
BL3-0, bl30) with the image terminology detailed in the TF wiki
(https://github.com/ARM-software/arm-trusted-firmware/wiki):

    BL0          -->  SCP_BL1
    BL30, BL3-0  -->  SCP_BL2
    bl30         -->  scp_bl2

This change affects code, documentation, build system, tools and
platform ports that load SCP firmware. ARM plaforms have been
updated to the new porting API.

IMPORTANT: build option to specify the SCP FW image has changed:

    BL30 --> SCP_BL2

IMPORTANT: This patch breaks compatibility for platforms that use BL2
to load SCP firmware. Affected platforms must be updated as follows:

    BL30_IMAGE_ID --> SCP_BL2_IMAGE_ID
    BL30_BASE --> SCP_BL2_BASE
    bl2_plat_get_bl30_meminfo() --> bl2_plat_get_scp_bl2_meminfo()
    bl2_plat_handle_bl30() --> bl2_plat_handle_scp_bl2()

Change-Id: I24c4c1a4f0e4b9f17c9e4929da815c4069549e58
diff --git a/plat/arm/common/arm_bl2_setup.c b/plat/arm/common/arm_bl2_setup.c
index a44ec1d..0ee1b0d 100644
--- a/plat/arm/common/arm_bl2_setup.c
+++ b/plat/arm/common/arm_bl2_setup.c
@@ -90,7 +90,7 @@
 #pragma weak bl2_plat_get_bl31_ep_info
 #pragma weak bl2_plat_flush_bl31_params
 #pragma weak bl2_plat_set_bl31_ep_info
-#pragma weak bl2_plat_get_bl30_meminfo
+#pragma weak bl2_plat_get_scp_bl2_meminfo
 #pragma weak bl2_plat_get_bl32_meminfo
 #pragma weak bl2_plat_set_bl32_ep_info
 #pragma weak bl2_plat_get_bl33_meminfo
@@ -235,12 +235,12 @@
 }
 
 /*******************************************************************************
- * Populate the extents of memory available for loading BL3-0 (if used),
+ * Populate the extents of memory available for loading SCP_BL2 (if used),
  * i.e. anywhere in trusted RAM as long as it doesn't overwrite BL2.
  ******************************************************************************/
-void bl2_plat_get_bl30_meminfo(meminfo_t *bl30_meminfo)
+void bl2_plat_get_scp_bl2_meminfo(meminfo_t *scp_bl2_meminfo)
 {
-	*bl30_meminfo = bl2_tzram_layout;
+	*scp_bl2_meminfo = bl2_tzram_layout;
 }
 
 /*******************************************************************************
diff --git a/plat/arm/common/arm_io_storage.c b/plat/arm/common/arm_io_storage.c
index 56d711c..8c5845c 100644
--- a/plat/arm/common/arm_io_storage.c
+++ b/plat/arm/common/arm_io_storage.c
@@ -53,8 +53,8 @@
 	.uuid = UUID_TRUSTED_BOOT_FIRMWARE_BL2,
 };
 
-static const io_uuid_spec_t bl30_uuid_spec = {
-	.uuid = UUID_SCP_FIRMWARE_BL30,
+static const io_uuid_spec_t scp_bl2_uuid_spec = {
+	.uuid = UUID_SCP_FIRMWARE_SCP_BL2,
 };
 
 static const io_uuid_spec_t bl31_uuid_spec = {
@@ -133,9 +133,9 @@
 		(uintptr_t)&bl2_uuid_spec,
 		open_fip
 	},
-	[BL30_IMAGE_ID] = {
+	[SCP_BL2_IMAGE_ID] = {
 		&fip_dev_handle,
-		(uintptr_t)&bl30_uuid_spec,
+		(uintptr_t)&scp_bl2_uuid_spec,
 		open_fip
 	},
 	[BL31_IMAGE_ID] = {
diff --git a/plat/arm/css/common/css_bl2_setup.c b/plat/arm/css/common/css_bl2_setup.c
index 6054f7a..15db8d1 100644
--- a/plat/arm/css/common/css_bl2_setup.c
+++ b/plat/arm/css/common/css_bl2_setup.c
@@ -37,25 +37,25 @@
 #include "css_scp_bootloader.h"
 
 /* Weak definition may be overridden in specific CSS based platform */
-#pragma weak bl2_plat_handle_bl30
+#pragma weak bl2_plat_handle_scp_bl2
 
 /*******************************************************************************
- * Transfer BL3-0 from Trusted RAM using the SCP Download protocol.
+ * Transfer SCP_BL2 from Trusted RAM using the SCP Download protocol.
  * Return 0 on success, -1 otherwise.
  ******************************************************************************/
-int bl2_plat_handle_bl30(image_info_t *bl30_image_info)
+int bl2_plat_handle_scp_bl2(image_info_t *scp_bl2_image_info)
 {
 	int ret;
 
-	INFO("BL2: Initiating BL3-0 transfer to SCP\n");
+	INFO("BL2: Initiating SCP_BL2 transfer to SCP\n");
 
-	ret = scp_bootloader_transfer((void *)bl30_image_info->image_base,
-		bl30_image_info->image_size);
+	ret = scp_bootloader_transfer((void *)scp_bl2_image_info->image_base,
+		scp_bl2_image_info->image_size);
 
 	if (ret == 0)
-		INFO("BL2: BL3-0 transferred to SCP\n");
+		INFO("BL2: SCP_BL2 transferred to SCP\n");
 	else
-		ERROR("BL2: BL3-0 transfer failure\n");
+		ERROR("BL2: SCP_BL2 transfer failure\n");
 
 	return ret;
 }
@@ -72,7 +72,7 @@
 {
 	arm_bl2_early_platform_setup(mem_layout);
 
-	/* Save SCP Boot config before it gets overwritten by BL30 loading */
+	/* Save SCP Boot config before it gets overwritten by SCP_BL2 loading */
 	scp_boot_config = mmio_read_32(SCP_BOOT_CFG_ADDR);
 	VERBOSE("BL2: Saved SCP Boot config = 0x%x\n", scp_boot_config);
 }
diff --git a/plat/arm/css/common/css_common.mk b/plat/arm/css/common/css_common.mk
index 49fedc3..8fcfbe5 100644
--- a/plat/arm/css/common/css_common.mk
+++ b/plat/arm/css/common/css_common.mk
@@ -60,8 +60,8 @@
   Please set RESET_TO_BL31 to 0.")
 endif
 
-# Subsystems require a BL30 image
-$(eval $(call FIP_ADD_IMG,BL30,--bl30))
+# Subsystems require a SCP_BL2 image
+$(eval $(call FIP_ADD_IMG,SCP_BL2,--scp_bl2))
 
 # Enable option to detect whether the SCP ROM firmware in use predates version
 # 1.7.0 and therefore, is incompatible.
diff --git a/plat/arm/css/common/css_scp_bootloader.c b/plat/arm/css/common/css_scp_bootloader.c
index acc7351..c01f42f 100644
--- a/plat/arm/css/common/css_scp_bootloader.c
+++ b/plat/arm/css/common/css_scp_bootloader.c
@@ -118,10 +118,10 @@
 	cmd_info_payload_t *cmd_info_payload;
 	cmd_data_payload_t *cmd_data_payload;
 
-	assert((uintptr_t) image == BL30_BASE);
+	assert((uintptr_t) image == SCP_BL2_BASE);
 
 	if ((image_size == 0) || (image_size % 4 != 0)) {
-		ERROR("Invalid size for the BL3-0 image. Must be a multiple of "
+		ERROR("Invalid size for the SCP_BL2 image. Must be a multiple of "
 			"4 bytes and not zero (current size = 0x%x)\n",
 			image_size);
 		return -1;
@@ -134,7 +134,7 @@
 
 	mhu_secure_init();
 
-	VERBOSE("Send info about the BL3-0 image to be transferred to SCP\n");
+	VERBOSE("Send info about the SCP_BL2 image to be transferred to SCP\n");
 
 	/*
 	 * Send information about the SCP firmware image about to be transferred
@@ -174,9 +174,9 @@
 		return -1;
 	}
 
-	VERBOSE("Transferring BL3-0 image to SCP\n");
+	VERBOSE("Transferring SCP_BL2 image to SCP\n");
 
-	/* Transfer BL3-0 image to SCP */
+	/* Transfer SCP_BL2 image to SCP */
 	scp_boot_message_start();
 
 	BOM_CMD_HEADER->id = BOOT_CMD_DATA;