Skip to content

Commit c2afad6

Browse files
Kamil Koniecznyherbertx
authored andcommitted
crypto: s5p-sss - Add HASH support for Exynos
Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. It uses the crypto framework asynchronous hash api. It is based on omap-sham.c driver. S5P has some HW differencies and is not implemented. Modifications in s5p-sss: - Add hash supporting structures and functions. - Modify irq handler to handle both aes and hash signals. - Resize resource end in probe if EXYNOS_HASH is enabled in Kconfig. - Add new copyright line and new author. - Tested on Odroid-U3 with Exynos 4412 CPU, kernel 4.13-rc6 with crypto run-time self test testmgr and with tcrypt module with: modprobe tcrypt sec=1 mode=N where N=402, 403, 404 (MD5, SHA1, SHA256). Modifications in drivers/crypto/Kconfig: - Add new CRYPTO_DEV_EXYNOS_HASH, depend on !EXYNOS_RNG and CRYPTO_DEV_S5P - Select sw algorithms MD5, SHA1 and SHA256 in EXYNOS_HASH as they are needed for fallback. Acked-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Kamil Konieczny <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent e5e4090 commit c2afad6

File tree

2 files changed

+1410
-10
lines changed

2 files changed

+1410
-10
lines changed

drivers/crypto/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,20 @@ config CRYPTO_DEV_S5P
427427
Select this to offload Samsung S5PV210 or S5PC110, Exynos from AES
428428
algorithms execution.
429429

430+
config CRYPTO_DEV_EXYNOS_HASH
431+
bool "Support for Samsung Exynos HASH accelerator"
432+
depends on CRYPTO_DEV_S5P
433+
depends on !CRYPTO_DEV_EXYNOS_RNG && CRYPTO_DEV_EXYNOS_RNG!=m
434+
select CRYPTO_SHA1
435+
select CRYPTO_MD5
436+
select CRYPTO_SHA256
437+
help
438+
Select this to offload Exynos from HASH MD5/SHA1/SHA256.
439+
This will select software SHA1, MD5 and SHA256 as they are
440+
needed for small and zero-size messages.
441+
HASH algorithms will be disabled if EXYNOS_RNG
442+
is enabled due to hw conflict.
443+
430444
config CRYPTO_DEV_NX
431445
bool "Support for IBM PowerPC Nest (NX) cryptographic acceleration"
432446
depends on PPC64

0 commit comments

Comments
 (0)