diff options
author | Corentin Labbe <clabbe.montjoie@gmail.com> | 2019-11-20 16:28:33 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-12-11 16:36:05 +0800 |
commit | 1e02e6fbdadb3a0cb56294ff37eeeb8109e1f493 (patch) | |
tree | e0f914cbe7238615c146c311554cbfbc8ebac4cb /drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h | |
parent | 6b3413f30dd6bf406a2579ab2ea4d25979a81cd3 (diff) |
crypto: sun4i-ss - add the A33 variant of SS
The A33 SS has a difference with all other SS, it give SHA1 digest
directly in BE.
So this patch adds variant support in sun4i-ss.
Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator")
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h')
-rw-r--r-- | drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h index 60425ac75d90..2b4c6333eb67 100644 --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h @@ -131,7 +131,16 @@ #define SS_SEED_LEN 192 #define SS_DATA_LEN 160 +/* + * struct ss_variant - Describe SS hardware variant + * @sha1_in_be: The SHA1 digest is given by SS in BE, and so need to be inverted. + */ +struct ss_variant { + bool sha1_in_be; +}; + struct sun4i_ss_ctx { + const struct ss_variant *variant; void __iomem *base; int irq; struct clk *busclk; |