Commit 7d0979e2 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Herbert Xu

crypto: atmel-tdes - Remove useless write in Control Register

As claimed by the datasheet, writing 0 into the Control Register has no
effect. Remove this useless register access.
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent e7836518
...@@ -265,7 +265,7 @@ static void atmel_tdes_dma_callback(void *data) ...@@ -265,7 +265,7 @@ static void atmel_tdes_dma_callback(void *data)
static int atmel_tdes_write_ctrl(struct atmel_tdes_dev *dd) static int atmel_tdes_write_ctrl(struct atmel_tdes_dev *dd)
{ {
int err; int err;
u32 valcr = 0, valmr = TDES_MR_SMOD_PDC; u32 valmr = TDES_MR_SMOD_PDC;
err = atmel_tdes_hw_init(dd); err = atmel_tdes_hw_init(dd);
...@@ -307,7 +307,6 @@ static int atmel_tdes_write_ctrl(struct atmel_tdes_dev *dd) ...@@ -307,7 +307,6 @@ static int atmel_tdes_write_ctrl(struct atmel_tdes_dev *dd)
if ((dd->flags & TDES_FLAGS_ENCRYPT) || (dd->flags & TDES_FLAGS_OFB)) if ((dd->flags & TDES_FLAGS_ENCRYPT) || (dd->flags & TDES_FLAGS_OFB))
valmr |= TDES_MR_CYPHER_ENC; valmr |= TDES_MR_CYPHER_ENC;
atmel_tdes_write(dd, TDES_CR, valcr);
atmel_tdes_write(dd, TDES_MR, valmr); atmel_tdes_write(dd, TDES_MR, valmr);
atmel_tdes_write_n(dd, TDES_KEY1W1R, dd->ctx->key, atmel_tdes_write_n(dd, TDES_KEY1W1R, 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