
4 Mar
2013
4 Mar
'13
11:16 p.m.
On Fri, 1 Mar 2013 11:16:24 -0500 Akshay Saraswat akshay.s@samsung.com wrote:
+#include <ace_sha.h>
/*
- These are the hash algorithms we support. Chips which support accelerated
- crypto could perhaps add named version of these algorithms here.
*/ static struct hash_algo hash_algo[] = { +#ifdef CONFIG_EXYNOS_ACE_SHA
- {
"SHA1",
SHA1_SUM_LEN,
ace_sha_hash_digest,
ACE_SHA_TYPE_SHA1,
- }, {
"SHA256",
SHA256_SUM_LEN,
ace_sha_hash_digest,
ACE_SHA_TYPE_SHA256,
- },
Can we make this a generic "hardware accelerated SHA", not tied to vendor-SoC-specific defines? I don't see more than one h/w implementation being used on any one instance of u-boot...
+#ifdef CONFIG_EXYNOS_ACE_SHA
- int (*hash_func_ws)(const unsigned char *input, unsigned int ilen,
unsigned char *output, unsigned int chunk_sz);
+#else void (*hash_func_ws)(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz); +#endif
function signature mismatch, but I see Simon already got this.
Kim