[v2,6/7] crypto: stm32 - fix MDMAT condition

Message ID 20230713151518.1513949-7-thomas.bourgoin@foss.st.com
State New
Headers
Series Support of HASH on STM32MP13 |

Commit Message

Thomas Bourgoin July 13, 2023, 3:15 p.m. UTC
  From: Thomas Bourgoin <thomas.bourgoin@foss.st.com>

If IP has MDMAT support, set or reset the bit MDMAT in Control Register.

Fixes: b56403a25af7 ("crypto: stm32/hash - Support Ux500 hash")
Cc: stable@vger.kernel.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>

---
Changes in v2:
 - add Cc: stable@vger.kernel.org in commit message
 - add Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

 drivers/crypto/stm32/stm32-hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index 701995a72e57..a48e6a14da2e 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -544,7 +544,7 @@  static int stm32_hash_xmit_dma(struct stm32_hash_dev *hdev,
 
 	reg = stm32_hash_read(hdev, HASH_CR);
 
-	if (!hdev->pdata->has_mdmat) {
+	if (hdev->pdata->has_mdmat) {
 		if (mdma)
 			reg |= HASH_CR_MDMAT;
 		else