From patchwork Thu Jan 27 08:04:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kavyasree Kotagiri X-Patchwork-Id: 12726382 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 947A5C433F5 for ; Thu, 27 Jan 2022 08:06:31 +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=bD6dK5ksZoPvlNFlNW2eX7DNpTmNcwPd0Yw85XruvUc=; b=qgfjMnhRHCRQdW Ruz+3kbxoQtZL/Y3HNesC5IS9Yz7Hy/lP244AxtYAXkb0g3gev0c0PXaMoyyjtlH2iaOlugE+xAe4 qr0XuGBqUXCdR3Bk/+jJ2tQt5KYGaCsN85axq+BbAG4jQIN7xhNi745XFx9H2V9+IHYtOwempyfgu VXpXBRBzOAZfiU46aXRBBuHIyCQPCM4Na0btqVuQoqBslpWmM2ValY1iqIPHIA4IKGm1WHmb0kVqN SRjg+2tJy0J54g0eAAQmt/8xVeQCFOV5bPBSH0kkIjZLvQNds8881CfZsBg2I+7HjV0NwWluHk/NJ WJOie+JSGnzAdJ83JTmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCzmE-00EhFX-0s; Thu, 27 Jan 2022 08:05:06 +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 1nCzly-00EhDB-P4 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 08:04:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1643270690; x=1674806690; h=from:to:cc:subject:date:message-id:mime-version; bh=YWLfVwtEW0AriDI6I/Te250BeiLS2TU4DY+DRwJFHks=; b=F1lHEv11JJAa+KmnXkOGYN63iNLGKP+ZpUlKKV3tg+Sr1FnDFCMTHzY+ t5BWtMOuDcaWUMFQhMS29TvHvrJlGj7UlyisjA5RfGRPxpL2OLr4plR9I UYEfhUm9LgdDo2d1etIRf4I8G4AQmeD69Z3cIEmD29Jh8+A77A7PIh/5c zjQ/v3OVYMPdLGjpSBJUiecJnejnyZCmAFAQeYOZtQ3FY6hAOmWFeVJbZ PbL8gRExWelELAWY51CYMLNbLBt6X1nTiIEUFrb0cGUdYDe0iX2w4TCTT Z14GheF5HY1+hFGOWU46Ad7l1eDPFx+aVqmJi0lJL9on1IwtlZujBo5yM w==; IronPort-SDR: JSOzhSf5BRfTmZ4iMVuE+uJ+mY5S7DSTp3OG3gmA7908KbSHCvhwxC0ZBobm3nU2NQrdjarO6o n4DmSUanG5wcq46EF9GanyNAg7s6FNzzUav6XWBx3eFaPrUPl5xMa5xrds5I5EY39uzL3TUB8c 2gFxDBs5OlCrWLTy/ANsFCMsG74YrwMUU99SkknKkZQdln9d60ONhhsEbk6ECUsmULYmxd4Wgs n0juJNj1ysd6E8NmBoWyQxv/h1dZ+0OYBe97k3sH2UHTcieCDRvR34KyAbgALmS4yxjSCo4Ii+ 2yR72ZfUd09C2J8hgS95r98O X-IronPort-AV: E=Sophos;i="5.88,320,1635231600"; d="scan'208";a="144049447" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Jan 2022 01:04:47 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 27 Jan 2022 01:04:46 -0700 Received: from kavya-HP-Compaq-6000-Pro-SFF-PC.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 27 Jan 2022 01:04:42 -0700 From: Kavyasree Kotagiri To: , , , , , CC: , , , , Subject: [PATCH] crypto: atmel: add support for AES and SHA IPs available on lan966x SoC Date: Thu, 27 Jan 2022 13:34:08 +0530 Message-ID: <20220127080408.15791-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_000450_943459_734F361D X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. 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. Tested-by: Vradha Panchal Signed-off-by: Kavyasree Kotagiri --- drivers/crypto/atmel-aes.c | 2 ++ drivers/crypto/atmel-sha.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index fe0558403191..358f1092d890 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2509,6 +2509,8 @@ static void atmel_aes_get_cap(struct atmel_aes_dev *dd) /* keep only major version number */ switch (dd->hw_version & 0xff0) { + case 0x700: + fallthrough; 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..6c7bb91c8cce 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2508,6 +2508,8 @@ static void atmel_sha_get_cap(struct atmel_sha_dev *dd) /* keep only major version number */ switch (dd->hw_version & 0xff0) { + case 0x700: + fallthrough; case 0x510: dd->caps.has_dma = 1; dd->caps.has_dualbuff = 1;