diff options
author | Yael Chemla <yael.chemla@foss.arm.com> | 2018-10-18 13:59:58 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-09 17:36:49 +0800 |
commit | 18a1dc1fd56b4a5b468ad5bf984a2b0ea5ee8c69 (patch) | |
tree | a86cb670bc1df0f5551fbd8e916a7319ec4d9905 /drivers/crypto/ccree/cc_hw_queue_defs.h | |
parent | crypto: ccree - adjust hash length to suit certain context specifics (diff) | |
download | linux-dev-18a1dc1fd56b4a5b468ad5bf984a2b0ea5ee8c69.tar.xz linux-dev-18a1dc1fd56b4a5b468ad5bf984a2b0ea5ee8c69.zip |
crypto: ccree - modify set_cipher_mode usage from cc_hash
encapsulate set_cipher_mode call with another api,
preparation for specific hash behavior as needed in later patches
when SM3 introduced.
Signed-off-by: Yael Chemla <yael.chemla@foss.arm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | drivers/crypto/ccree/cc_hw_queue_defs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/crypto/ccree/cc_hw_queue_defs.h b/drivers/crypto/ccree/cc_hw_queue_defs.h index f719ff9c0277..6e8438a71478 100644 --- a/drivers/crypto/ccree/cc_hw_queue_defs.h +++ b/drivers/crypto/ccree/cc_hw_queue_defs.h @@ -458,6 +458,20 @@ static inline void set_cipher_mode(struct cc_hw_desc *pdesc, int mode) } /* + * Set the cipher mode for hash algorithms. + * + * @pdesc: pointer HW descriptor struct + * @cipher_mode: Any one of the modes defined in [CC7x-DESC] + * @hash_mode: specifies which hash is being handled + */ +static inline void set_hash_cipher_mode(struct cc_hw_desc *pdesc, + enum drv_cipher_mode cipher_mode, + enum drv_hash_mode hash_mode) +{ + set_cipher_mode(pdesc, cipher_mode); +} + +/* * Set the cipher configuration fields. * * @pdesc: pointer HW descriptor struct |