refactor(ff-a): replace `plat_ffa_` prefix for public functions

Replace `plat_ffa_` prefix with `ffa_{file_name}_` prefix. Only do so
for public functions to avoid unnecessary churn (private functions are
renamed in the next commit).

Change-Id: I847c218f134a2519a45a3af1d6c4b953db9c1cbb
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/ffa/hypervisor/cpu_cycles.c b/src/ffa/hypervisor/cpu_cycles.c
index 91aa1ce..f2a9251 100644
--- a/src/ffa/hypervisor/cpu_cycles.c
+++ b/src/ffa/hypervisor/cpu_cycles.c
@@ -127,8 +127,9 @@
 	return (struct ffa_value){.func = FFA_SUCCESS_32};
 }
 
-struct ffa_value plat_ffa_error_32(struct vcpu *current, struct vcpu **next,
-				   enum ffa_error error_code)
+struct ffa_value ffa_cpu_cycles_error_32(struct vcpu *current,
+					 struct vcpu **next,
+					 enum ffa_error error_code)
 {
 	(void)current;
 	(void)next;
diff --git a/src/ffa/hypervisor/direct_messaging.c b/src/ffa/hypervisor/direct_messaging.c
index 2555545..7aeffe4 100644
--- a/src/ffa/hypervisor/direct_messaging.c
+++ b/src/ffa/hypervisor/direct_messaging.c
@@ -69,7 +69,7 @@
 					   struct ffa_value args,
 					   struct ffa_value *ret)
 {
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		dlog_verbose("Not forwarding: ffa_tee_enabled is false\n");
 		return false;
 	}
@@ -119,7 +119,8 @@
 	(void)next_locked;
 }
 
-bool plat_ffa_handle_framework_msg(struct ffa_value args, struct ffa_value *ret)
+bool ffa_direct_msg_handle_framework_msg(struct ffa_value args,
+					 struct ffa_value *ret)
 {
 	(void)args;
 	(void)ret;
@@ -127,7 +128,7 @@
 	return false;
 }
 
-bool plat_ffa_is_spmd_lp_id(ffa_id_t vm_id)
+bool ffa_direct_msg_is_spmd_lp_id(ffa_id_t vm_id)
 {
 	(void)vm_id;
 	return false;
diff --git a/src/ffa/hypervisor/ffa_memory.c b/src/ffa/hypervisor/ffa_memory.c
index f41378b..0803f63 100644
--- a/src/ffa/hypervisor/ffa_memory.c
+++ b/src/ffa/hypervisor/ffa_memory.c
@@ -425,7 +425,7 @@
 	struct vm *from = vm_find(HF_TEE_VM_ID);
 	struct two_vm_locked vm_to_from_lock;
 
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		dlog_verbose("Invalid handle %#lx for FFA_MEM_RECLAIM.\n",
 			     handle);
 		return ffa_error(FFA_INVALID_PARAMETERS);
diff --git a/src/ffa/hypervisor/init.c b/src/ffa/hypervisor/init.c
index 0b53d6a..b87ca54 100644
--- a/src/ffa/hypervisor/init.c
+++ b/src/ffa/hypervisor/init.c
@@ -17,22 +17,22 @@
 
 static bool ffa_tee_enabled = false;
 
-bool plat_ffa_is_tee_enabled(void)
+bool ffa_init_is_tee_enabled(void)
 {
 	return ffa_tee_enabled;
 }
 
-void plat_ffa_set_tee_enabled(bool tee_enabled)
+void ffa_init_set_tee_enabled(bool tee_enabled)
 {
 	ffa_tee_enabled = tee_enabled;
 }
 
-void plat_ffa_log_init(void)
+void ffa_init_log(void)
 {
 	dlog_info("Initializing Hafnium (Hypervisor)\n");
 }
 
-void plat_ffa_init(struct mpool *ppool)
+void ffa_init(struct mpool *ppool)
 {
 	struct vm *other_world_vm = vm_find(HF_OTHER_WORLD_ID);
 	struct ffa_value ret;
@@ -51,7 +51,7 @@
 
 	(void)ppool;
 
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		return;
 	}
 
@@ -95,7 +95,7 @@
 		pa_from_va(va_from_ptr(other_world_vm->mailbox.send)),
 		HF_MAILBOX_SIZE / FFA_PAGE_SIZE);
 
-	plat_ffa_set_tee_enabled(true);
+	ffa_init_set_tee_enabled(true);
 
 	/*
 	 * Hypervisor will write to secure world receive buffer, and will read
diff --git a/src/ffa/hypervisor/notifications.c b/src/ffa/hypervisor/notifications.c
index 82a42a8..e366241 100644
--- a/src/ffa/hypervisor/notifications.c
+++ b/src/ffa/hypervisor/notifications.c
@@ -132,7 +132,7 @@
 {
 	struct ffa_value ret;
 
-	if (plat_ffa_is_tee_enabled()) {
+	if (ffa_init_is_tee_enabled()) {
 		ret = arch_other_world_call((struct ffa_value){
 			.func = FFA_NOTIFICATION_BITMAP_CREATE_32,
 			.arg1 = vm_id,
@@ -261,7 +261,7 @@
 	assert(from_fwk != NULL);
 
 	/* Get SPMC notifications. */
-	if (plat_ffa_is_tee_enabled()) {
+	if (ffa_init_is_tee_enabled()) {
 		ret = arch_other_world_call((struct ffa_value){
 			.func = FFA_NOTIFICATION_GET_32,
 			.arg1 = (vcpu_id << 16) | receiver_id,
diff --git a/src/ffa/hypervisor/setup_and_discovery.c b/src/ffa/hypervisor/setup_and_discovery.c
index 8c7c8e4..07f1a57 100644
--- a/src/ffa/hypervisor/setup_and_discovery.c
+++ b/src/ffa/hypervisor/setup_and_discovery.c
@@ -20,7 +20,7 @@
 
 struct ffa_value ffa_setup_spmc_id_get(void)
 {
-	if (plat_ffa_is_tee_enabled()) {
+	if (ffa_init_is_tee_enabled()) {
 		/*
 		 * Fetch the SPMC ID from the SPMD using FFA_SPM_ID_GET.
 		 * DEN0077A FF-A v1.1 Beta0 section 13.9.2
@@ -60,7 +60,7 @@
 	struct vm *vm = vm_locked.vm;
 	struct vm *other_world;
 
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		vm_locked.vm->mailbox.state = MAILBOX_STATE_EMPTY;
 		return;
 	}
@@ -97,7 +97,7 @@
 
 	id = vm_locked.vm->id;
 
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		return;
 	}
 
@@ -127,7 +127,7 @@
 	 * Allow forwarding from the Hypervisor if TEE or SPMC exists and
 	 * declared as such in the Hypervisor manifest.
 	 */
-	return plat_ffa_is_tee_enabled();
+	return ffa_init_is_tee_enabled();
 }
 
 /*
@@ -150,7 +150,7 @@
 	 * Allow forwarding from the Hypervisor if TEE or SPMC exists and
 	 * declared as such in the Hypervisor manifest.
 	 */
-	if (!plat_ffa_is_tee_enabled()) {
+	if (!ffa_init_is_tee_enabled()) {
 		return vm_count;
 	}
 
@@ -249,7 +249,7 @@
 	struct vm *vm = vm_locked.vm;
 	ffa_id_t vm_id = vm->id;
 
-	if (!plat_ffa_is_tee_enabled() ||
+	if (!ffa_init_is_tee_enabled() ||
 	    !ffa_vm_supports_indirect_messages(vm)) {
 		return false;
 	}
@@ -294,7 +294,7 @@
 	 * - The VM's version is not FF-A v1.1.
 	 * - If the mailbox ownership hasn't been transferred to the SPMC.
 	 */
-	if (!plat_ffa_is_tee_enabled() ||
+	if (!ffa_init_is_tee_enabled() ||
 	    !ffa_vm_supports_indirect_messages(to_locked.vm) ||
 	    to_locked.vm->mailbox.state != MAILBOX_STATE_OTHER_WORLD_OWNED) {
 		return true;