crypto: ccree - swap SHA384 and SHA512 larval hashes at build time
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Feb 2020 18:18:59 +0000 (19:18 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:43 +0000 (09:25 +0800)
commitf08b58501c74d6ec0828b55a0d4e0b2e840c2b9e
treeb0365f7808291b9a3fecbbc3291b874998ea5631
parentf4274eeca476305a78f140e2e74bd07bd379a5da
crypto: ccree - swap SHA384 and SHA512 larval hashes at build time

Due to the way the hardware works, every double word in the SHA384 and
SHA512 larval hashes must be swapped.  Currently this is done at run
time, during driver initialization.

However, this swapping can easily be done at build time.  Treating each
double word as two words has the benefit of changing the larval hashes'
types from u64[] to u32[], like for all other hashes, and allows
dropping the casts and size doublings when calling cc_set_sram_desc().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_driver.c
drivers/crypto/ccree/cc_hash.c
drivers/crypto/ccree/cc_hash.h