From patchwork Fri Jan 28 07:17:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kavyasree Kotagiri X-Patchwork-Id: 12728031 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 B56BEC433F5 for ; Fri, 28 Jan 2022 07:19:37 +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=Klk/I7RbmFXzynaNMx00skPLVJixSw+NNYpyQUkWP6g=; b=X+1QmgDGPO+1vr +spJ2UUjEQ635Drrvz2tAFYsbGOENCeHWLEpVvSC4VV0VV820GcS4lCbQIfCSFl/s9IGUhrHHAP7H Nb+tJi6fEHruiHj0AxsnPPd9MlS+G19NFv/qwNYCSzgY2J3fxVz5ls7BQuX1RIspqV5q1gycPpXN/ i6E2DipXLXQv9WdIe9DCeZ+Y+sSc/tzkC1tooeF2KwvPmETlIMTsn2AF0PV0wAjzHA+uFPciOW0td 8uUP4ny+HzYLv0M+F/RxRjYu5Yj9doUkJZxV8AAu4LVjum8UQJYqXf3goG/RpNNN/wHMiyoOmkI8i QRNY2s2wgiwjQC3cZmdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDLWN-000mO9-AN; Fri, 28 Jan 2022 07:18:11 +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 1nDLWH-000mLj-Kf for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 07:18:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1643354285; x=1674890285; h=from:to:cc:subject:date:message-id:mime-version; bh=K+Uv8pmoiitwbzIuGduDNaut2mMU/wE30++d5+B9hSQ=; b=Byrkv7BNJ/Z5Zdebs6MfL5eJB+5kqJAVPwNkY4lgilcitmqSRbBvODy0 g7Iit3NyIRyRKMM1Jz1iu/NWyk+gogPp6KIPzOAihHjx/3mDlULIrO4E1 rxNd40lA/PZHBHSboykMZxDt0lNmih6/A4Ym/4TdXuF+WmeovUKMlwtyn Amy0ArAXoqD6KpVP4qlsvfSH+Qwi1p8L8GNH08mr0PxUIPajRI2n1fDhG WqKRby4+mDh0RQ14fu2V+T5uICfaDVrwBG1TIVAi5AIOfXPDUoFE5Fuz7 4XzyAeMgcC3b4tLy5hjIAtNr3goT5CSUnOV9HjZCZlH694RuVenUCxtXB A==; IronPort-SDR: 5N8rWxNHDZ5OQXBnq36Wf4it0+f8lxYfM96DKaDFgUqftlpn8Kj5zSU6xWdYTgh79L+GlLbMWE Rk9vNFmXXpWMBXSi0Qyqp0Stx2yUnt2kTVKrTJf7iyBJ1NqiQeHJdMC7YhbIuEt9kfdjFlsVdV WbsUwR5Jd89nIRbd9wYBte6mH1FTgMZoAkwFn4OZHhSBqqlTqEqP2J4MRXVmLyY1aqMeIxpE8o 9Ft6ieCHni0bsuHDZL+9VTlvkJUzIGXXgO7BmtqE7lbf5XPh8ZwDnJ+NdmO4kktNyLyqRfStvP KaWkB00f8OEQ4jlfrgb3ENHI X-IronPort-AV: E=Sophos;i="5.88,322,1635231600"; d="scan'208";a="83968551" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 28 Jan 2022 00:18:03 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 28 Jan 2022 00:18:02 -0700 Received: from kavya-HP-Compaq-6000-Pro-SFF-PC.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 28 Jan 2022 00:17:57 -0700 From: Kavyasree Kotagiri To: , , , , , CC: , , , , Subject: [PATCH v2] crypto: atmel: add support for AES and SHA IPs available on lan966x SoC Date: Fri, 28 Jan 2022 12:47:55 +0530 Message-ID: <20220128071755.25277-1-kavyasree.kotagiri@microchip.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_231805_782011_B4BCDD3E X-CRM114-Status: GOOD ( 10.14 ) 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 This patch adds support for hardware version of AES and SHA IPs available on lan966x SoC. Signed-off-by: Kavyasree Kotagiri Reviewed-by: Tudor Ambarus Tested-by: Tudor Ambarus --- v1 -> v2: - Removed fallthrough line, as it is not required. 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 fe0558403191..f72c6b3e4ad8 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2509,6 +2509,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 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 1b13f601fd95..d1628112dacc 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2508,6 +2508,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 0x510: dd->caps.has_dma = 1; dd->caps.has_dualbuff = 1;