summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-01-25 03:23:10 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2023-02-03 07:54:55 +0300
commitb56403a25af703064bed0d7e81d2c9ffb30511ff (patch)
treea0dd99c5e776a9a7cf0326aab1b40800c79d4fe6 /fs
parent5a2d52b54065c2aeb0012d050734ead78252215a (diff)
downloadlinux-b56403a25af703064bed0d7e81d2c9ffb30511ff.tar.xz
crypto: stm32/hash - Support Ux500 hash
The Ux500 has a hash block which is an ancestor to the STM32 hash block. With some minor code path additions we can support also this variant in the STM32 driver. Differences: - Ux500 only supports SHA1 and SHA256 (+/- MAC) so we split up the algorithm registration per-algorithm and register each algorithm along with its MAC variant separately. - Ux500 does not have an interrupt to indicate that hash calculation is complete, so we add code paths to handle polling for completion if the interrupt is missing in the device tree. - Ux500 is lacking the SR status register, to check if an operating is complete, we need to poll the HASH_STR_DCAL bit in the HASH_STR register instead. - Ux500 had the resulting hash at address offset 0x0c and 8 32bit registers ahead. We account for this with a special code path when reading out the hash digest. - Ux500 need a special bit set in the control register before performing the final hash calculation on an empty message. - Ux500 hashes on empty messages will be performed if the above bit is set, but are incorrect. For this reason we just make an inline synchronous hash using a fallback hash. Tested on the Ux500 Golden device with the extended tests. Acked-by: Lionel Debieve <lionel.debieve@foss.st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions