From patchwork Thu Jul 6 07:37:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bourgoin X-Patchwork-Id: 13303276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5EE7EB64DC for ; Thu, 6 Jul 2023 07:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hTCZtDiUyCGLoZuVlFSkDliOcLDAS0L+JML3ywn5gr8=; b=w1l37DPUv8vR6y KzSAqL9zHcFdOczkJcLh+AIurmma91+tj+vNVZtL/3g/KlsVb3ErxY5gXdgpotU1fziX79cpwS3UL WAMm/+Z4GwGqa4ZRS87V4rpMytFfbq6IxZc6Xxu97K4jdX/d9LsD2yYldtOA6yGehbaSNt4S4flFL 0qAVextQSUxndL81w82e9el8UGwlPcd66VKfFqN8fKMqL97shrrFJxNbPAgrEma+qcoO/O1p6/igq rBRQsigeErRt12wTkL7E0Sfoy6SqsUo+4DjUPk+SD+1S1zIIWzrScOUVO8cJBsSuOHUUFZjX3TWre 8FHcU9rzhP4pwSSlQ5zA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHJaj-000pEk-2n; Thu, 06 Jul 2023 07:39:53 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHJag-000pD1-31 for linux-arm-kernel@lists.infradead.org; Thu, 06 Jul 2023 07:39:52 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3667B0TI024691; Thu, 6 Jul 2023 09:39:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=AfA8C5Z2MLV8Uji9mrzEkXwlc7KnvC3knmxH0kuI2O8=; b=CtbL8eVwEEUYL3PPysAOStd5DgpUi+0VPXgyp41S4EEgfllIJbgvwzG79zkgrIRoMrn6 TL/noRFqCALEBtbjV0v6H49FqkWfKR/pl1Ho7whFO2ylVSBOjJBNVG5K/sWYsYMtw4CC jn/y/AtOBxW8+PKECGLDvTqmrizCJs26BDECviKvqnJxX0d1QdNPzgmeEHI3vjBO8hTZ tmA8UJWyzBTVWM3QUiGYhW6utuj0i9TJuDtxR7if+KpylIR+CDIsIlEu780+DM3oRaGa NT7NKFXgT70LGlOM+rllmzN70A5wIkoZ4Gyj5lKHlEassIOqNBphAFXMWcbp7QeUlkHD aQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3rnkt8jegm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 09:39:33 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D5621100052; Thu, 6 Jul 2023 09:39:30 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CDD57212FA9; Thu, 6 Jul 2023 09:39:30 +0200 (CEST) Received: from localhost (10.201.22.9) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 6 Jul 2023 09:39:30 +0200 From: Thomas BOURGOIN To: Thomas BOURGOIN , Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , Linus Walleij CC: , , , , Subject: [PATCH 6/7] crypto: stm32 - fix MDMAT condition Date: Thu, 6 Jul 2023 09:37:18 +0200 Message-ID: <20230706073719.1156288-7-thomas.bourgoin@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> References: <20230706073719.1156288-1-thomas.bourgoin@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.22.9] X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_04,2023-07-06_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_003951_269913_7851AC31 X-CRM114-Status: GOOD ( 17.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thomas Bourgoin 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 Reviewed-by: Linus Walleij --- drivers/crypto/stm32/stm32-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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