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 96C11C352A1 for ; Wed, 7 Dec 2022 14:02:26 +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: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:In-Reply-To:References: List-Owner; bh=z0r0lpUkOs/AxDkhOQkxjGI02FCqqKJz46BFgQVwhtE=; b=Nj2zUghb0ymW3v LPT+TT23wRRSkJDSG5FkRGesF+s63VuFcUGFXgNmfZhjFK5SGMRq4AnDEqznk+S1JIQbJi5bjOMu7 Ex3Q74+tB+Z3O+kQBUjKih1igJWTofhb6A1jGfJQA+t1ZBnyUYJVNaAzveOthteTYcPbsQcPNxf/Y wuLIOODoBbpZYhtyz1sSdmGkJFs+zB4gwPeo90NsWCYw3r2JTKmLnouygi0WRMk5iJvoE+Q3Oa5s4 pRl17llIcofkkpWiY53snoEZ+n5I5xApYI4zm4ZZFClabH2Z5dbkdPeaTqTHCoJzLpCeFhQ9p3oDe ScN2Bhup3Ori8rzx4ERQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2uzC-004OKY-Hn; Wed, 07 Dec 2022 14:01:22 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2uz6-004OCv-EE for linux-arm-kernel@lists.infradead.org; Wed, 07 Dec 2022 14:01:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670421676; x=1701957676; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=w+QJEwn0ZcbEKI9H0GIF6G+r453iLRw7ezRK3Dm8zOo=; b=WO+2yZDqJxje3HsphPj0Ym/n+9QV4ti7KVXcIUBa5ds5hWusJcKEcy/8 +Wwgxeq3mVdTAQ8drCD1wA6AV+Spjn8MSAfESi1JJpwcyH/1KfkScEzyT 4K41dJ1TqXuALtdC43AAH5lC8ImAj1hxw2NIr1t2MFvrDoc/J/4NoiU8q uM006A2Jvw+zh/NIn/hHy/KZmu6UgXRYsQT5gTIbI1kOOjKj2gdTz08Jt 3ObL859AcSF5l8LcL+E1umUqKnrc3BiHtjHM/0k7ZpqzvTmk2TEB6/A4D TIxVMfZe1nfxXP5YUQ/M4v3WL5bu0GbpDA0jpdZKY6ow6ezdAX8nO/Nh+ Q==; X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="186983168" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 07 Dec 2022 07:00:55 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 7 Dec 2022 07:00:55 -0700 Received: from ROB-ULT-M68701.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 7 Dec 2022 07:00:53 -0700 From: Sergiu Moga To: , , , , CC: , , , Sergiu Moga Subject: [PATCH] crypto: atmel: Add capability case for the 0x600 SHA and AES IP versions Date: Wed, 7 Dec 2022 15:59:55 +0200 Message-ID: <20221207135953.136557-1-sergiu.moga@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221207_060116_590338_4B199B54 X-CRM114-Status: GOOD ( 10.17 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order for the driver to be made aware of the capabilities of the SHA and AES IP versions 0x600 , such as those present on the SAM9X60 SoC's, add a corresponding switch case to the capability method of the respective drivers. Without this, besides the capabilities not being correctly set, the self tests may hang since the driver is endlessly waiting for a completion to be set by a never occurring DMA interrupt handler. Signed-off-by: Sergiu Moga --- drivers/crypto/atmel-aes.c | 1 + drivers/crypto/atmel-sha.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 886bf258544c..063394cfa874 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2510,6 +2510,7 @@ static void atmel_aes_get_cap(struct atmel_aes_dev *dd) /* keep only major version number */ switch (dd->hw_version & 0xff0) { case 0x700: + case 0x600: case 0x500: dd->caps.has_dualbuff = 1; dd->caps.has_cfb64 = 1; diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index ca4b01926d1b..00be792e605c 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2509,6 +2509,7 @@ static void atmel_sha_get_cap(struct atmel_sha_dev *dd) /* keep only major version number */ switch (dd->hw_version & 0xff0) { case 0x700: + case 0x600: case 0x510: dd->caps.has_dma = 1; dd->caps.has_dualbuff = 1; -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel