Remove dependencies from FVP to generic code

Some generic parts of TFTF have dependencies from FVP platform
macros which can cause some trouble when porting the tests to a
different platform.

Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I11eb1af142b8c0ee1de2fcc8f298658bceedf306
diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h
index c3ad105..f9d1a6e 100644
--- a/include/lib/tftf_lib.h
+++ b/include/lib/tftf_lib.h
@@ -208,7 +208,7 @@
 unsigned int tftf_is_rebooted(void);
 
 static inline unsigned int make_mpid(unsigned int clusterid,
-#if FVP_MAX_PE_PER_CPU > 1
+#if PLAT_MAX_PE_PER_CPU > 1
 				     unsigned int coreid,
 				     unsigned int threadid)
 #else
@@ -221,7 +221,7 @@
 	 */
 	if ((read_mpidr_el1() & MPIDR_MT_MASK) != 0)
 		return MPIDR_MT_MASK |
-#if FVP_MAX_PE_PER_CPU > 1
+#if PLAT_MAX_PE_PER_CPU > 1
 			((threadid & MPIDR_AFFLVL_MASK) << MPIDR_AFF0_SHIFT) |
 #endif
 			((coreid & MPIDR_AFFLVL_MASK) << MPIDR_AFF1_SHIFT)   |
diff --git a/plat/arm/fvp/include/platform_def.h b/plat/arm/fvp/include/platform_def.h
index 3abeb03..ed45642 100644
--- a/plat/arm/fvp/include/platform_def.h
+++ b/plat/arm/fvp/include/platform_def.h
@@ -160,6 +160,8 @@
 					 PLATFORM_CORE_COUNT)
 #define PLATFORM_MAX_AFFLVL		MPIDR_AFFLVL2
 
+#define PLAT_MAX_PE_PER_CPU		FVP_MAX_PE_PER_CPU
+
 /* TODO : Migrate complete TFTF from affinity level to power levels */
 #define PLAT_MAX_PWR_LEVEL		PLATFORM_MAX_AFFLVL
 #define PLAT_MAX_PWR_STATES_PER_LVL	2
diff --git a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
index 708ea13..f58b6e4 100644
--- a/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
+++ b/tftf/tests/runtime_services/standard_service/psci/api_tests/affinity_info/test_psci_affinity_info.c
@@ -214,7 +214,7 @@
 	 * CPU on the platform. The PSCI implementation should ignore the
 	 * affinity 0 field.
 	 */
-#if FVP_MAX_PE_PER_CPU > 1
+#if PLAT_MAX_PE_PER_CPU > 1
 	target_mpid = make_mpid(cluster_id, 0, 0xE1);
 #else
 	target_mpid = make_mpid(cluster_id, 0xE1);