From patchwork Wed Jan 29 09:20:59 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: 3549731 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 96CB29F381 for ; Wed, 29 Jan 2014 09:21:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DDFD20170 for ; Wed, 29 Jan 2014 09:21:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6BBA420114 for ; Wed, 29 Jan 2014 09:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbaA2JVK (ORCPT ); Wed, 29 Jan 2014 04:21:10 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:61671 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbaA2JVH (ORCPT ); Wed, 29 Jan 2014 04:21:07 -0500 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N05008RBON57930@mailout1.samsung.com>; Wed, 29 Jan 2014 18:21:05 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 02.10.10364.108C8E25; Wed, 29 Jan 2014 18:21:05 +0900 (KST) X-AuditID: cbfee690-b7f266d00000287c-06-52e8c801c88b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id A3.C9.29263.108C8E25; Wed, 29 Jan 2014 18:21:05 +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 <0N0500BMRON0IQ70@mmp2.samsung.com>; Wed, 29 Jan 2014 18:21:05 +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, devicetree@vger.kernel.org, "David S. Miller" Subject: [PATCH 2/9 v5] crypto:s5p-sss: Add device tree support Date: Wed, 29 Jan 2014 14:50:59 +0530 Message-id: <1390987259-18581-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+NgFvrHLMWRmVeSWpSXmKPExsWyRsSkWpfxxIsgg1t7JS1eHtK0mHO+hcVi /pFzrBbdr2Qs7t/7yWRxedccNosZ5/cxWSza9p/Z4uycQ0wOnB5bVt5k8tg56y67x7YDqh59 W1YxenzeJBfAGsVlk5Kak1mWWqRvl8CVcen2T8aCTvGKg807GRsYJwp3MXJySAiYSJxduJ4J whaTuHBvPVsXIxeHkMBSRok7n+czwxTtmn2LHSIxnVHi2cUFTBBOP5PErBvzGUGq2ATMJA4u Ws0OYosIOEv8bl7DClLELHCKUWJ601k2kISwgL3E3p9NYEUsAqoSn3Y+ZwWxeQVcJZbMbgWy OYDWKUjMmWQDEuYUcJM49P0YC4gtBFSy6fpaFpCZEgLr2CX+zN/BCDFHQOLb5EMsEL2yEpsO QF0tKXFwxQ2WCYzCCxgZVjGKphYkFxQnpReZ6BUn5haX5qXrJefnbmIEhv3pf88m7GC8d8D6 EGM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Y7fox+1ul WlM4Vj6ZzCThpCqyz9pn9tMTG/0sN/YmL+o3+Hhsu/G1T2f7GDi0duw8fuHvivUPlViKMxIN tZiLihMBVjrIJO4CAAA= 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.4 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 v4: Modified Documentation to give clock names and example for interrupts Changes since v3: None .../devicetree/bindings/crypto/samsung-sss.txt | 24 ++++++++++++++++++++ drivers/crypto/s5p-sss.c | 8 +++++++ 2 files changed, 32 insertions(+) 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..d193084 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/samsung-sss.txt @@ -0,0 +1,24 @@ +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 + Eg : interrupts = <0 feed-control 0> <0 hash 0>; +- clocks : list of clock phandle and specifier pairs for all clocks listed in + clock-names property. +- clock-names : list of device clock input names; should contain one entry + "secss". + diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 93cddeb..73c8b38 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)); @@ -677,6 +684,7 @@ static struct platform_driver s5p_aes_crypto = { .driver = { .owner = THIS_MODULE, .name = "s5p-secss", + .of_match_table = s5p_sss_dt_match, }, };