From patchwork Tue Jun 10 12:43:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 4328721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54D5EBEEAA for ; Tue, 10 Jun 2014 12:46:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7092820204 for ; Tue, 10 Jun 2014 12:46:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64DB1201F5 for ; Tue, 10 Jun 2014 12:46:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WuLPL-0001A0-Pp; Tue, 10 Jun 2014 12:44:07 +0000 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WuLPB-00011l-SP for linux-arm-kernel@lists.infradead.org; Tue, 10 Jun 2014 12:44:00 +0000 Received: by mail-we0-f182.google.com with SMTP id q59so2169198wes.13 for ; Tue, 10 Jun 2014 05:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Mq3ghVHqFrcDqaqXXdq6WRMfU3tcRlLiuJx4Eq/s9mE=; b=uIi+07t+AFYTrksZBN9Bm7f9Dt1eMtSkL7/YoyeUAOF3o8ZsH7Wtl6pL8hNzJo64ET mQhq+70xwPZ9A8tPTTnuzLf+nnSgr3RaUzNt/sufYJu6J+R9rvxEBiESlGFjN8UkeTS1 OHH4D4HRkVf05U8gSkh9ge3rqwxf1AquKyyfDapZ7tu9a3e+W/LB1YbKAfCqFbZUnJuu sUornTTKr6dIqjB9eLvbV6CqV+EaPhdCS6e1pwLc8U17WLsuWoVYFhK8hsAjqdAmQg4g ttDasqP1l1QxND2yHm7ptrfrJ64mFlMWoRZPvXfX8Nu2yd6Cx2riAg2wIqkhh1a2b/+E SCrA== X-Received: by 10.180.93.234 with SMTP id cx10mr38123428wib.18.1402404213967; Tue, 10 Jun 2014 05:43:33 -0700 (PDT) Received: from Red.local (ANice-651-1-405-168.w86-205.abo.wanadoo.fr. [86.205.149.168]) by mx.google.com with ESMTPSA id f6sm20638842wiy.19.2014.06.10.05.43.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jun 2014 05:43:33 -0700 (PDT) From: LABBE Corentin To: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, rdunlap@infradead.org, maxime.ripard@free-electrons.com, linux@arm.linux.org.uk, herbert@gondor.apana.org.au, davem@davemloft.net, grant.likely@linaro.org Subject: [PATCH v3 2/4] crypto: Update makefile and Kconfig for Security System Date: Tue, 10 Jun 2014 14:43:15 +0200 Message-Id: <1402404197-4236-3-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1402404197-4236-1-git-send-email-clabbe.montjoie@gmail.com> References: <1402404197-4236-1-git-send-email-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140610_054358_172886_26FB0ECB X-CRM114-Status: GOOD ( 10.44 ) X-Spam-Score: -0.1 (/) Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, LABBE Corentin , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add necessary changes for configuring and compiling the Security System driver. Signed-off-by: LABBE Corentin --- drivers/crypto/Kconfig | 91 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/crypto/Makefile | 1 + 2 files changed, 92 insertions(+) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 03ccdb0..ed1c918 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -418,4 +418,95 @@ config CRYPTO_DEV_MXS_DCP To compile this driver as a module, choose M here: the module will be called mxs-dcp. +config CRYPTO_DEV_SUNXI_SS + tristate "Support for Allwinner Security System cryptographic accelerator" + depends on ARCH_SUNXI + help + Some Allwinner SoC have a crypto accelerator named + Security System. Select this if you want to use it. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss. + +if CRYPTO_DEV_SUNXI_SS +config CRYPTO_DEV_SUNXI_SS_PRNG + tristate "Security System PRNG" + select CRYPTO_RNG2 + help + If you enable this option, the SS will provide a pseudo random + number generator. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-prng. + +config CRYPTO_DEV_SUNXI_SS_HASH + tristate "Security System hash common" + help + Common parts of Security System shared by hash algorithms. + +config CRYPTO_DEV_SUNXI_SS_CIPHER + tristate "Security System cipher common" + help + Common parts of Security System shared by cipher algorithms. + +config CRYPTO_DEV_SUNXI_SS_MD5 + tristate "Security System MD5" + select CRYPTO_MD5 + select CRYPTO_DEV_SUNXI_SS_HASH + help + If you enable this option, the SS will provide MD5 hardware + acceleration. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-md5. + +config CRYPTO_DEV_SUNXI_SS_SHA1 + tristate "Security System SHA1" + select CRYPTO_SHA1 + select CRYPTO_DEV_SUNXI_SS_HASH + help + If you enable this option, the SS will provide SHA1 hardware + acceleration. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-sha1. + +config CRYPTO_DEV_SUNXI_SS_AES + tristate "Security System AES" + select CRYPTO_AES + select CRYPTO_BLKCIPHER + select CRYPTO_DEV_SUNXI_SS_CIPHER + help + If you enable this option, the SS will provide AES hardware + acceleration. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-aes. + +config CRYPTO_DEV_SUNXI_SS_DES + tristate "Security System DES" + select CRYPTO_DES + select CRYPTO_BLKCIPHER + select CRYPTO_DEV_SUNXI_SS_CIPHER + help + If you enable this option, the SS will provide DES hardware + acceleration. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-des. + +config CRYPTO_DEV_SUNXI_SS_3DES + tristate "Security System 3DES" + select CRYPTO_DES + select CRYPTO_BLKCIPHER + select CRYPTO_DEV_SUNXI_SS_CIPHER + help + If you enable this option, the SS will provide 3DES hardware + acceleration. + + To compile this driver as a module, choose M here: the module + will be called sunxi-ss-3des. + +endif #CRYPTO_DEV_SUNXI_SS + endif # CRYPTO_HW diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index 482f090..855292a 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -23,3 +23,4 @@ obj-$(CONFIG_CRYPTO_DEV_S5P) += s5p-sss.o obj-$(CONFIG_CRYPTO_DEV_SAHARA) += sahara.o obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o obj-$(CONFIG_CRYPTO_DEV_UX500) += ux500/ +obj-$(CONFIG_CRYPTO_DEV_SUNXI_SS) += sunxi-ss/