aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/crypto/caam/regs.h
diff options
context:
space:
mode:
authorHoria Geantă <horia.geanta@nxp.com>2019-04-16 19:27:12 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-04-25 15:38:12 +0800
commitdf80bfd34310935ffc2bc85baa15aed075c12ee3 (patch)
tree6576a472cc384de61d4f6917c276f5c54c14c710 /drivers/crypto/caam/regs.h
parentcrypto: caam - fix spelling mistake "cannote" -> "cannot" (diff)
downloadwireguard-linux-df80bfd34310935ffc2bc85baa15aed075c12ee3.tar.xz
wireguard-linux-df80bfd34310935ffc2bc85baa15aed075c12ee3.zip
crypto: caam/jr - update gcm detection logic
GCM detection logic has to change for two reasons: -some CAAM instantiations with Era < 10, even though they have AES LP, they now support GCM mode -Era 10 upwards, there is a dedicated bit in AESA_VERSION[AESA_MISC] field for GCM support For Era 9 and earlier, all AES accelerator versions support GCM, except for AES LP (CHAVID_LS[AESVID]=3) with revision CRNR[AESRN] < 8. For Era 10 and later, bit 9 of the AESA_VERSION register should be used to detect GCM support in AES accelerator. Note: caam/qi and caam/qi2 are drivers for QI (Queue Interface), which is used in DPAA-based SoCs; for now, we rely on CAAM having an AES HP and this AES accelerator having support for GCM. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/regs.h')
-rw-r--r--drivers/crypto/caam/regs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index 9e912c722e33..c1fa1ec701d9 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -261,6 +261,9 @@ struct version_regs {
#define CHA_VER_VID_SHIFT 24
#define CHA_VER_VID_MASK (0xffull << CHA_VER_VID_SHIFT)
+/* CHA Miscellaneous Information - AESA_MISC specific */
+#define CHA_VER_MISC_AES_GCM BIT(1 + CHA_VER_MISC_SHIFT)
+
/*
* caam_perfmon - Performance Monitor/Secure Memory Status/
* CAAM Global Status/Component Version IDs