[07/16] crypto: atmel-tdes - Remove useless write in Control Register
diff mbox series

Message ID 20191205095326.5094-8-tudor.ambarus@microchip.com
State Accepted
Delegated to: Herbert Xu
Headers show
Series
  • crypto: atmel - Fixes and cleanup patches
Related show

Commit Message

Tudor Ambarus Dec. 5, 2019, 9:53 a.m. UTC
From: Tudor Ambarus <tudor.ambarus@microchip.com>

As claimed by the datasheet, writing 0 into the Control Register has no
effect. Remove this useless register access.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
 drivers/crypto/atmel-tdes.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c
index 16527ef2a05b..0b9badbd232d 100644
--- a/drivers/crypto/atmel-tdes.c
+++ b/drivers/crypto/atmel-tdes.c
@@ -265,7 +265,7 @@  static void atmel_tdes_dma_callback(void *data)
 static int atmel_tdes_write_ctrl(struct atmel_tdes_dev *dd)
 {
 	int err;
-	u32 valcr = 0, valmr = TDES_MR_SMOD_PDC;
+	u32 valmr = TDES_MR_SMOD_PDC;
 
 	err = atmel_tdes_hw_init(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))
 		valmr |= TDES_MR_CYPHER_ENC;
 
-	atmel_tdes_write(dd, TDES_CR, valcr);
 	atmel_tdes_write(dd, TDES_MR, valmr);
 
 	atmel_tdes_write_n(dd, TDES_KEY1W1R, dd->ctx->key,