summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ux500/cryp/cryp_irq.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2022-12-03 10:15:17 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2022-12-09 18:45:00 +0800
commit0b496efbd2d00f658dbf906882d935e7fa3dfd03 (patch)
tree79630c80556b3dae5d8ca963e2db1d5b91f4cbe8 /drivers/crypto/ux500/cryp/cryp_irq.c
parentfe867538c1620738bda5328a14179a3c2bc95ab1 (diff)
downloadlinux-0b496efbd2d00f658dbf906882d935e7fa3dfd03.tar.bz2
crypto: stm32/cryp - enable for use with Ux500
This adds a few small quirks to handle the differences between the STM32 and Ux500 cryp blocks. The following differences are handled with special bool switch bits in the capabilities: - The main difference is that some registers are removed, so we add register offsets for all registers in the per-variant data. Then we assign the right offsets for Ux500 vs the STM32 variants. - The Ux500 does not support the aeads algorithms; gcm(aes) and ccm(aes). Avoid registering them when running on Ux500. - The Ux500 has a special "linear" key format and does some elaborare bit swizzling of the key bits before writing them into the key registers. This is written as an "application note" inside the DB8500 design specification, and seems to be the result of some mishap when assigning the data lines to register bits. (STM32 has clearly fixed this.) - The Ux500 does not have the KP "key prepare" bit in the CR register. Instead, we need to set the KSE bit, "key schedule encryption" bit which does the same thing but is in bit 11 rather than being a special "algorithm type" as on STM32. The algorithm must however be specified as AES ECB while doing this. - The Ux500 cannot just read out IV registers, we need to set the KEYRDEN "key read enable" bit, as this protects not just the key but also the IV from being read out. Enable this bit before reading out the IV and disable it afterwards. Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> 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 'drivers/crypto/ux500/cryp/cryp_irq.c')
0 files changed, 0 insertions, 0 deletions