From patchwork Thu Jul 13 15:15:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Bourgoin X-Patchwork-Id: 13312437 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 91321C0015E for ; Thu, 13 Jul 2023 15:34:38 +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=rcYLsL/zsSnFzCB2fv3grxCfvxUBkVR4iLld0YNqU7c=; b=rrm6EQXNMHWKfg lYy6jKZLR0/0tnpCpXuLNbOEdnrOdZbc7EFUdn/2z8Vk8ywFagrHpDRgMDDXnEK1NWCbNFR8bWcus GpYOih+I82PcxCpXRD9W+RBQwY5eSWYAPgt0EwRnC701QH+7ZXVRUkguzDJQsFt5cZt53r6GOeOvx nVDZobpoyXMR9HFsyiHcVcwbamFGez4q20v5BtPHoD8YwcWLHMVfkJQfPHMh9CalxgG1CguxBKZ5a E6aAErnVi4HOs12/DgNTU36mEAbnV+aYqchwsjUz/n857F5lz9wIt7DWPsZmfjiY44sEfoEK6bx0u vZwCd5TRtnQmPJkAS5Aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJyKa-003mgb-0V; Thu, 13 Jul 2023 15:34:12 +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 1qJyKV-003mdX-0i for linux-arm-kernel@lists.infradead.org; Thu, 13 Jul 2023 15:34:08 +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 36DE76Xf025621; Thu, 13 Jul 2023 17:33:54 +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=9F6WErzaW9yZms4oqilaaA1OMFfEi8u05w2TDpODLdQ=; b=BxnAvAsVA1ARCXH+hP7D77fDRADWd8rY2vs2SR81btppIzV157crx8j60RomTdlIDbOq gwtZSmxJnU2YDODfyAJFwchoUf4Bha8g+lsW9Ime6MSdf3DSXJao4PbOEArayRzBV5AL oIzzwCcI+UNxpmEPuTnye7MhSudnNUyybKf2aX/nSLBIfci+aBGlwrcLJ0D+d30kcVnr TWIyw+DMs+bYkHU4tDvQ8Dhhl88mCozjJgyk7nnnCbOp+Y3J/JvWLvihIe2/uYMFQ+ro Tm6fojmYkCfj3dSD57O63CZjhcvRcx4P6xu0sX8zKmTIYwbA63lEO6pSsDItIKuJ7AHB 9A== 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 3rtjrc8h8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jul 2023 17:33:54 +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 4E93E100056; Thu, 13 Jul 2023 17:33:54 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 46A9B22A6FF; Thu, 13 Jul 2023 17:33:54 +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, 13 Jul 2023 17:33:56 +0200 From: Thomas BOURGOIN To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , Linus Walleij CC: , , , , , Thomas Bourgoin , Subject: [PATCH v2 6/7] crypto: stm32 - fix MDMAT condition Date: Thu, 13 Jul 2023 17:15:17 +0200 Message-ID: <20230713151518.1513949-7-thomas.bourgoin@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230713151518.1513949-1-thomas.bourgoin@foss.st.com> References: <20230713151518.1513949-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-13_06,2023-07-13_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230713_083407_564536_3EF5841C X-CRM114-Status: GOOD ( 17.76 ) 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") Cc: stable@vger.kernel.org Reviewed-by: Linus Walleij Signed-off-by: Thomas Bourgoin --- Changes in v2: - add Cc: stable@vger.kernel.org in commit message - add 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 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