From patchwork Fri Jan 10 11:42:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 3465691 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 AD72EC02DC for ; Fri, 10 Jan 2014 11:42:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A2F320109 for ; Fri, 10 Jan 2014 11:42:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 40180200DC for ; Fri, 10 Jan 2014 11:42:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbaAJLmE (ORCPT ); Fri, 10 Jan 2014 06:42:04 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:35486 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbaAJLmC (ORCPT ); Fri, 10 Jan 2014 06:42:02 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZ600AH0OI0Y930@mailout3.samsung.com>; Fri, 10 Jan 2014 20:42:01 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 02.20.09028.88CDFC25; Fri, 10 Jan 2014 20:42:00 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-c2-52cfdc880c45 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6C.86.29263.88CDFC25; Fri, 10 Jan 2014 20:42:00 +0900 (KST) Received: from username-ubuntu.sisodomain.com ([107.108.83.161]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZ600689OHWPE80@mmp2.samsung.com>; Fri, 10 Jan 2014 20:42:00 +0900 (KST) From: Naveen Krishna Chatradhi To: linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, vzapolskiy@gmail.com, herbert@gondor.apana.org.au, naveenkrishna.ch@gmail.com, cpgs@samsung.com, tomasz.figa@gmail.com, "David S. Miller" Subject: [PATCH 2/8 v3] crypto:s5p-sss: Add device tree support Date: Fri, 10 Jan 2014 17:12:18 +0530 Message-id: <1389354138-31784-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1389243541-13122-1-git-send-email-ch.naveen@samsung.com> References: <1389243541-13122-1-git-send-email-ch.naveen@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRmVeSWpSXmKPExsWyRsSkRrfjzvkgg+3/rSxeHtK0mHO+hcWi +5WMxf17P5ksLu+aw2Yx4/w+JotF2/4zW6za9YfR4uycQ0wOnB5bVt5k8tg56y67x7YDqh59 W1YxenzeJBfAGsVlk5Kak1mWWqRvl8CVsXdDL2PBe7GKt0e3MjUwtgl3MXJySAiYSJyeOI0N whaTuHBvPZDNxSEksJRRYm/zY9YuRg6wolUf+CDi0xkl9u38BlXUzyQx894zdpBuNgEziYOL VoPZIgLOEr+b17CCFDELHGWU+DznIhNIQljAXqJlzhdmEJtFQFVi6c5eFhCbV8BVYseWCSwQ 2xQk5kyyAQlzCrhJHPp+DKxECKhk0/W1LCAzJQRWsUvMe3+FCWKOgMS3yYegemUlNh1ghvhG UuLgihssExiFFzAyrGIUTS1ILihOSi8y0itOzC0uzUvXS87P3cQIDPrT/5717WC8ecD6EGMy 0LiJzFK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jbvzaE3rF6VHF JJ/DF4x6D+4XW8KU6toi8e2kOh/Dhxtr/6XVizn+NOwuy8qd5OI/xWHzeg4lluKMREMt5qLi RABFahhX7QIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 This patch adds device tree support to the s5p-sss.c crypto driver. Also, Documentation under devicetree/bindings added. Signed-off-by: Naveen Krishna Ch CC: Herbert Xu CC: David S. Miller CC: Vladimir Zapolskiy TO: CC: --- Changes since v2: 1. Moved the variant struct part to the Exynos support patch 2. Changed the compatible strings to s5pv210-secss .../devicetree/bindings/crypto/samsung-sss.txt | 20 ++++++++++++++++++++ drivers/crypto/s5p-sss.c | 10 +++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/crypto/samsung-sss.txt diff --git a/Documentation/devicetree/bindings/crypto/samsung-sss.txt b/Documentation/devicetree/bindings/crypto/samsung-sss.txt new file mode 100644 index 0000000..2f9d7e4 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/samsung-sss.txt @@ -0,0 +1,20 @@ +Samsung SoC SSS (Security SubSystem) module + +The SSS module in S5PV210 SoC supports the following: +-- Feeder (FeedCtrl) +-- Advanced Encryption Standard (AES) +-- Data Encryption Standard (DES)/3DES +-- Public Key Accelerator (PKA) +-- SHA-1/SHA-256/MD5/HMAC (SHA-1/SHA-256/MD5)/PRNG +-- PRNG: Pseudo Random Number Generator + +Required properties: + +- compatible : Should contain entries for this and backward compatible + SSS versions: + - "samsung,s5pv210-secss" for S5PV210 SoC. +- reg : Offset and length of the register set for the module +- interrupts : the interrupt-specifier for the SSS module. + Two interrupts "feed control and hash" in case of S5PV210 +- clocks : the required gating clock for the SSS module. +- clock-names : the gating clock name to be requested in the SSS driver. diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 93cddeb..2da5617 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -177,6 +178,12 @@ struct s5p_aes_dev { static struct s5p_aes_dev *s5p_dev; +static const struct of_device_id s5p_sss_dt_match[] = { + { .compatible = "samsung,s5pv210-secss", }, + { }, +}; +MODULE_DEVICE_TABLE(of, s5p_sss_dt_match); + static void s5p_set_dma_indata(struct s5p_aes_dev *dev, struct scatterlist *sg) { SSS_WRITE(dev, FCBRDMAS, sg_dma_address(sg)); @@ -676,7 +683,8 @@ static struct platform_driver s5p_aes_crypto = { .remove = s5p_aes_remove, .driver = { .owner = THIS_MODULE, - .name = "s5p-secss", + .name = "s5pv210-secss", + .of_match_table = s5p_sss_dt_match, }, };