linux/drivers/crypto
Linus Walleij b56403a25a 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>
2023-02-03 12:54:55 +08:00
..
allwinner crypto: sun8i-ce - Add TRNG clock to the D1 variant 2023-01-13 16:39:04 +08:00
amcc crypto: amcc - Hold the reference returned by of_find_compatible_node 2022-07-08 15:21:16 +08:00
amlogic crypto: amlogic - Remove kcalloc without check 2022-12-02 18:12:40 +08:00
aspeed crypto: aspeed - Use devm_platform_get_and_ioremap_resource() 2023-01-27 18:58:09 +08:00
axis crypto: xts - drop xts_check_key() 2023-01-06 17:15:47 +08:00
bcm crypto: bcm - Use subrequest for fallback 2023-01-27 18:58:09 +08:00
caam crypto: caam - Use ahash_request_complete 2023-01-27 18:58:09 +08:00
cavium crypto: xts - drop xts_check_key() 2023-01-06 17:15:47 +08:00
ccp crypto: ccp - Flush the SEV-ES TMR memory before giving it to firmware 2023-02-03 12:54:54 +08:00
ccree crypto: xts - drop xts_check_key() 2023-01-06 17:15:47 +08:00
chelsio crypto: chelsio - Set DMA alignment explicitly 2022-12-09 18:45:00 +08:00
gemini Revert "crypto: gemini - Fix error check for dma_map_sg" 2022-09-02 18:15:53 +08:00
hisilicon crypto: hisilicon - remove redundant config PCI dependency for some CRYPTO_DEV_HISI configs 2023-01-20 18:29:31 +08:00
inside-secure crypto: safexcel - Set DMA alignment explicitly 2022-12-09 18:45:00 +08:00
keembay crypto: keembay - Set DMA alignment explicitly 2022-12-09 18:45:00 +08:00
marvell crypto: marvell/cesa - Use crypto_wait_req 2023-02-03 12:54:54 +08:00
nx crypto: Prepare to move crypto_tfm_ctx 2022-12-02 18:12:40 +08:00
qat crypto: qat - add qat_zlib_deflate 2023-02-03 12:54:54 +08:00
qce crypto: qce - Set DMA alignment explicitly 2022-12-09 18:45:00 +08:00
rockchip crypto: rockchip - Remove surplus dev_err() when using platform_get_irq() 2022-11-11 18:14:59 +08:00
stm32 crypto: stm32/hash - Support Ux500 hash 2023-02-03 12:54:55 +08:00
ux500 crypto: ux500 - update debug config after ux500 cryp driver removal 2022-12-30 22:56:27 +08:00
virtio crypto: virtio - Use helper to set reqsize 2022-12-02 18:12:39 +08:00
vmx Merge branch 'topic/objtool' into next 2022-12-08 23:57:47 +11:00
xilinx crypto: xilinx: prevent probing on non-xilinx hardware 2022-03-09 15:12:31 +12:00
atmel-aes-regs.h
atmel-aes.c crypto: xts - drop xts_check_key() 2023-01-06 17:15:47 +08:00
atmel-authenc.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
atmel-ecc.c crypto: atmel-ecc - Convert to i2c's .probe_new() 2022-11-25 17:39:19 +08:00
atmel-i2c.c crypto: atmel-i2c - avoid defines prefixed with CONFIG 2023-01-20 18:29:31 +08:00
atmel-i2c.h crypto: atmel-i2c - avoid defines prefixed with CONFIG 2023-01-20 18:29:31 +08:00
atmel-sha204a.c crypto: atmel-sha204a - Convert to i2c's .probe_new() 2022-11-25 17:39:19 +08:00
atmel-sha-regs.h
atmel-sha.c crypto: atmel - Add capability case for the 0x600 SHA and AES IP versions 2022-12-30 22:56:27 +08:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-tdes - initialize tdes_dd while declaring 2022-07-15 16:43:22 +08:00
exynos-rng.c
geode-aes.c crypto: geode - use DEFINE_SPINLOCK() for spinlock 2021-04-16 21:16:31 +10:00
geode-aes.h
hifn_795x.c crypto: drivers - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
img-hash.c crypto: img-hash - Fix sparse endianness warning 2023-02-03 12:54:54 +08:00
ixp4xx_crypto.c crypto: ixp4xx - Fix sparse warnings 2022-10-21 19:15:35 +08:00
Kconfig crypto: ccree,hisilicon - Fix dependencies to correct algorithm 2022-12-02 18:12:41 +08:00
Makefile crypto: stm32 - enable drivers to be used on Ux500 2022-12-09 18:45:00 +08:00
mxs-dcp.c crypto: mxs-dcp - Fix scatterlist processing 2022-01-31 11:21:46 +11:00
n2_asm.S
n2_core.c crypto: n2 - add missing hash statesize 2022-10-21 19:15:35 +08:00
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
omap-aes.h
omap-crypto.c crypto: omap - Avoid redundant copy when using truncated sg list 2021-08-21 15:44:53 +08:00
omap-crypto.h
omap-des.c crypto: omap-des - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2022-12-02 18:12:40 +08:00
padlock-aes.c crypto: algapi - Remove skbuff.h inclusion 2020-08-20 14:04:28 +10:00
padlock-sha.c crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
qcom-rng.c crypto: qcom-rng - Fix qcom_rng_of_match unused warning 2022-08-19 18:39:35 +08:00
s5p-sss.c crypto: s5p-sss - Drop if with an always false condition 2022-07-15 16:43:21 +08:00
sa2ul.c crypto: sa2ul - Check engine status before enabling 2022-07-15 16:43:22 +08:00
sa2ul.h crypto: sa2ul - Check engine status before enabling 2022-07-15 16:43:22 +08:00
sahara.c crypto: sahara - Fix error check for dma_map_sg 2022-08-26 18:50:39 +08:00
talitos.c crypto: talitos - Remove GFP_DMA and add DMA alignment padding 2023-01-06 17:15:47 +08:00
talitos.h crypto: talitos - Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper 2022-10-21 19:05:24 +08:00