refactor(lib/smc): Update measurement to use RMI header

Avoid duplicate definitions of HASH_ALGO and fix the internal enum
to use RMI header definition. Also the patch removes the unused
rmi_data_measure_content typedef.

Signed-off-by: Yousuf A <yousuf.sait@arm.com>
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I19c39ebca1f2684c1b97de1281f7690f5207b71d
diff --git a/lib/measurement/CMakeLists.txt b/lib/measurement/CMakeLists.txt
index a5b7634..20582d2 100644
--- a/lib/measurement/CMakeLists.txt
+++ b/lib/measurement/CMakeLists.txt
@@ -7,6 +7,7 @@
 
 target_link_libraries(rmm-lib-measurement
     PUBLIC rmm-mbedtls
+           rmm-lib-smc
     PRIVATE rmm-lib-arch
             rmm-lib-common
             rmm-lib-debug)
diff --git a/lib/measurement/include/measurement.h b/lib/measurement/include/measurement.h
index dd54d92..b20ff5e 100644
--- a/lib/measurement/include/measurement.h
+++ b/lib/measurement/include/measurement.h
@@ -7,26 +7,15 @@
 #define MEASUREMENT_H
 
 #include <assert.h>
+#include <smc-rmi.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <utils_def.h>
 
 /* Supported algorithms */
 enum hash_algo {
-	HASH_ALGO_SHA256 = 0,
-	HASH_ALGO_SHA512 = 1,
-};
-
-/*
- * RmiDataMeasureContent enumeration representing
- * whether to measure DATA Granule contents.
- */
-enum rmi_data_measure_content {
-	/* Do not measure DATA Granule contents */
-	RMI_NO_MEASURE_CONTENT = 0U,
-
-	/* Measure DATA Granule contents */
-	RMI_MEASURE_CONTENT = 1U
+	HASH_ALGO_SHA256 = RMI_HASH_ALGO_SHA256,
+	HASH_ALGO_SHA512 = RMI_HASH_ALGO_SHA512,
 };
 
 /*
diff --git a/lib/smc/include/smc-rmi.h b/lib/smc/include/smc-rmi.h
index 0535436..f7c3e03 100644
--- a/lib/smc/include/smc-rmi.h
+++ b/lib/smc/include/smc-rmi.h
@@ -7,7 +7,7 @@
 #ifndef SMC_RMI_H
 #define SMC_RMI_H
 
-#include <measurement.h>
+#include <stddef.h>
 #include <smc.h>
 
 /*
@@ -55,8 +55,8 @@
 #define REC_EXIT_NR_GPRS		(31U)
 
 /* RmiHashAlgorithm type */
-#define RMI_HASH_ALGO_SHA256	HASH_ALGO_SHA256
-#define RMI_HASH_ALGO_SHA512	HASH_ALGO_SHA512
+#define RMI_HASH_ALGO_SHA256	0
+#define RMI_HASH_ALGO_SHA512	1
 
 /* Maximum number of Interrupt Controller List Registers */
 #define REC_GIC_NUM_LRS			(16U)