From 6b5fc19227ff8935b1352c0e4c0d716ebee60aa2 Mon Sep 17 00:00:00 2001 From: Lionel Debieve Date: Tue, 4 Oct 2022 14:28:57 +0200 Subject: [PATCH] feat(st-crypto): remove BL32 HASH driver usage Remove unused mode for HASH driver. The driver will only be used in BL2 scope. Change-Id: I1fce09cdaa9da0c11554ac5f73433b4bee776011 Signed-off-by: Lionel Debieve --- drivers/st/crypto/stm32_hash.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/st/crypto/stm32_hash.c b/drivers/st/crypto/stm32_hash.c index 70f327289..e92f98000 100644 --- a/drivers/st/crypto/stm32_hash.c +++ b/drivers/st/crypto/stm32_hash.c @@ -202,13 +202,12 @@ static int hash_get_digest(uint8_t *digest) memcpy(digest + (i * sizeof(uint32_t)), &dsg, sizeof(uint32_t)); } -#if defined(IMAGE_BL2) /* * Clean hardware context as HASH could be used later * by non-secure software */ hash_hw_init(HASH_SHA256); -#endif + return 0; } @@ -329,17 +328,9 @@ int stm32_hash_register(void) for (node = dt_get_node(&hash_info, -1, DT_HASH_COMPAT); node != -FDT_ERR_NOTFOUND; node = dt_get_node(&hash_info, node, DT_HASH_COMPAT)) { -#if defined(IMAGE_BL2) if (hash_info.status != DT_DISABLED) { break; } -#else - /* BL32 uses hash if it is assigned only to secure world */ - if (hash_info.status == DT_SECURE) { - stm32mp_register_secure_periph_iomem(hash_info.base); - break; - } -#endif } if (node == -FDT_ERR_NOTFOUND) { -- 2.39.5