Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbaAJLmG (ORCPT ); Fri, 10 Jan 2014 06:42:06 -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 X-AuditID: cbfee68e-b7f566d000002344-c2-52cfdc880c45 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 UuLgihssExiFFzAyrGIUTS1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szFti5udpPSmZ1bM/ba5X+b1RWcuXOLwOETQwrKkM/j27aBUb4+3M8TjbvzaE3rF6VHF JJ/DF4x6D+4XW8KU6toi8e2kOh/Dhxtr/6XVizn+NOwuy8qd5OI/xWHzeg4lluKMREMt5qLi RABFahhX7QIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, }, }; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/