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 <lionel.debieve@foss.st.com>
diff --git a/drivers/st/crypto/stm32_hash.c b/drivers/st/crypto/stm32_hash.c
index 70f3272..e92f980 100644
--- a/drivers/st/crypto/stm32_hash.c
+++ b/drivers/st/crypto/stm32_hash.c
@@ -202,13 +202,12 @@
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 @@
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) {