summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorgaurav rana <gaurav.rana@freescale.com>2015-02-20 07:21:46 (GMT)
committerYork Sun <yorksun@freescale.com>2015-02-25 21:20:02 (GMT)
commit94e3c8c4fd7bfe395fa467973cd647551d6d98c7 (patch)
treeb591415085fa8629245dcd2183f2dc50f550ccc1 /common
parent7ee8c4795d0ab0f1cd25496bfbcdedb184ef5a8d (diff)
downloadu-boot-94e3c8c4fd7bfe395fa467973cd647551d6d98c7.tar.xz
crypto/fsl - Add progressive hashing support using hardware acceleration.
Currently only normal hashing is supported using hardware acceleration. Added support for progressive hashing using hardware. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Signed-off-by: Gaurav Rana <gaurav.rana@freescale.com> CC: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/hash.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/hash.c b/common/hash.c
index d154d02..9e9f84b 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -127,11 +127,21 @@ static struct hash_algo hash_algo[] = {
SHA1_SUM_LEN,
hw_sha1,
CHUNKSZ_SHA1,
+#ifdef CONFIG_SHA_PROG_HW_ACCEL
+ hw_sha_init,
+ hw_sha_update,
+ hw_sha_finish,
+#endif
}, {
"sha256",
SHA256_SUM_LEN,
hw_sha256,
CHUNKSZ_SHA256,
+#ifdef CONFIG_SHA_PROG_HW_ACCEL
+ hw_sha_init,
+ hw_sha_update,
+ hw_sha_finish,
+#endif
},
#endif
#ifdef CONFIG_SHA1