crypto: atmel-aes - change atmel_aes_write_ctrl() signature
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Thu, 17 Dec 2015 16:48:38 +0000 (17:48 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Dec 2015 10:19:51 +0000 (18:19 +0800)
commitcdfab4a7e3f16224e3a52dfe990a9bd870363690
treedddf642de4022dbe241be30ecb5ed987a522b3cd
parentaab0a39b281e9a26ae991f0737f2fa6f710d0dab
crypto: atmel-aes - change atmel_aes_write_ctrl() signature

This patch changes the signature of atmel_aes_write_ctrl() to make it more
generic. This will be used by future patches when implementing new block
cipher modes such as GCM.

Especially atmel_aes_hw_init() is now called outside
atmel_aes_write_ctrl(): this allows to call atmel_aes_write_ctrl() many
times, still initializing the hardware only once.

Indeed, the support of GCM will require to update the Mode Register and
the IV when processing a single request.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-aes.c