Commit 794595d2 authored by Cyrille Pitchen's avatar Cyrille Pitchen Committed by Herbert Xu

crypto: atmel-aes - remove useless write in the Control Register

As claimed by the datasheet, writing 0 into the Control Register has no
effet. So we remove this useless register access.
Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent ccbf7298
...@@ -511,7 +511,7 @@ static int atmel_aes_crypt_dma_start(struct atmel_aes_dev *dd) ...@@ -511,7 +511,7 @@ static int atmel_aes_crypt_dma_start(struct atmel_aes_dev *dd)
static void atmel_aes_write_ctrl(struct atmel_aes_dev *dd, bool use_dma, static void atmel_aes_write_ctrl(struct atmel_aes_dev *dd, bool use_dma,
const u32 *iv) const u32 *iv)
{ {
u32 valcr = 0, valmr = 0; u32 valmr = 0;
/* MR register must be set before IV registers */ /* MR register must be set before IV registers */
if (dd->ctx->keylen == AES_KEYSIZE_128) if (dd->ctx->keylen == AES_KEYSIZE_128)
...@@ -554,7 +554,6 @@ static void atmel_aes_write_ctrl(struct atmel_aes_dev *dd, bool use_dma, ...@@ -554,7 +554,6 @@ static void atmel_aes_write_ctrl(struct atmel_aes_dev *dd, bool use_dma,
valmr |= AES_MR_SMOD_AUTO; valmr |= AES_MR_SMOD_AUTO;
} }
atmel_aes_write(dd, AES_CR, valcr);
atmel_aes_write(dd, AES_MR, valmr); atmel_aes_write(dd, AES_MR, valmr);
atmel_aes_write_n(dd, AES_KEYWR(0), dd->ctx->key, atmel_aes_write_n(dd, AES_KEYWR(0), dd->ctx->key,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment