]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(st-crypto): remove BL32 HASH driver usage
authorLionel Debieve <lionel.debieve@foss.st.com>
Tue, 4 Oct 2022 12:28:57 +0000 (14:28 +0200)
committerLionel Debieve <lionel.debieve@foss.st.com>
Mon, 14 Nov 2022 09:55:17 +0000 (10:55 +0100)
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>
drivers/st/crypto/stm32_hash.c

index 70f327289a8d49af612a938982c39dee818e30e9..e92f980003d61d04e273f2ec1c494963f4a4ac69 100644 (file)
@@ -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) {