diff mbox series

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

Message ID 20230706073719.1156288-7-thomas.bourgoin@foss.st.com (mailing list archive)
State New, archived
Headers show
Series Support of HASH on STM32MP13 | expand

Commit Message

Thomas Bourgoin July 6, 2023, 7:37 a.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")
Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
---
 drivers/crypto/stm32/stm32-hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij July 6, 2023, 9:42 p.m. UTC | #1
On Thu, Jul 6, 2023 at 9:39 AM Thomas BOURGOIN
<thomas.bourgoin@foss.st.com> wrote:

> 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")
> Signed-off-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>

Oops probably my fault.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

This should probably be applied for fixes/stable.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index ee68e38b6e28..0b5e580efbba 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