refactor(tc): add plat_rse_comms_init
The same way it is done for neoverse_rd, create a plat_rse_comms_init()
function to call rse_comms_init().
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I12f3b8a38a5369decb4b97f8aceeb0dc81cbea28
diff --git a/plat/arm/board/tc/rotpk_test.c b/plat/arm/board/tc/rotpk_test.c
index 2178f69..3d6c95d 100644
--- a/plat/arm/board/tc/rotpk_test.c
+++ b/plat/arm/board/tc/rotpk_test.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023, Arm Limited. All rights reserved.
+ * Copyright (c) 2023-2025, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -7,10 +7,10 @@
#include <stdint.h>
#include <stdio.h>
-#include <drivers/arm/rse_comms.h>
#include <plat/common/platform.h>
#include <rse_platform_api.h>
#include <tc_plat.h>
+#include <tc_rse_comms.h>
static void print_hex(const char *key_id_name, size_t key_size, const uint8_t *key_buf)
{
@@ -33,9 +33,10 @@
{.key_id = RSE_BUILTIN_KEY_ID_HOST_CCA_ROTPK, .key_id_name = "CCA-ROTPK"}
};
- status = rse_comms_init(PLAT_RSE_AP_SND_MHU_BASE, PLAT_RSE_AP_RCV_MHU_BASE);
+ status = plat_rse_comms_init();
if (status != PSA_SUCCESS) {
- printf("Failed to initialize RSE communication channel - psa_status = %d\n", status);
+ printf("Failed to initialize RSE communication channel - psa_status = %d\n",
+ status);
return -1;
}
@@ -43,7 +44,8 @@
status = rse_platform_key_read(key_ids[i].key_id, key_buf,
sizeof(key_buf), &key_size);
if (status != PSA_SUCCESS) {
- printf("Failed to retrieve %s - psa_status = %d\n", key_ids[i].key_id_name, status);
+ printf("Failed to retrieve %s - psa_status = %d\n", key_ids[i].key_id_name,
+ status);
return -1;
}
print_hex(key_ids[i].key_id_name, key_size, key_buf);