From patchwork Fri Mar 17 14:49:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9630869 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B84160245 for ; Fri, 17 Mar 2017 14:54:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D08328506 for ; Fri, 17 Mar 2017 14:54:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 619E628514; Fri, 17 Mar 2017 14:54:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2186C28506 for ; Fri, 17 Mar 2017 14:54:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751189AbdCQOw1 (ORCPT ); Fri, 17 Mar 2017 10:52:27 -0400 Received: from mail.kernel.org ([198.145.29.136]:54784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdCQOwH (ORCPT ); Fri, 17 Mar 2017 10:52:07 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EDCF20481; Fri, 17 Mar 2017 14:51:21 +0000 (UTC) Received: from localhost.localdomain (bzq-109-66-69-167.red.bezeqint.net [109.66.69.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 424C72021B; Fri, 17 Mar 2017 14:51:03 +0000 (UTC) From: Krzysztof Kozlowski To: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Zapolskiy Cc: Nathan Royce , Krzysztof Kozlowski Subject: [PATCH 3/4] crypto: s5p-sss - Document the struct s5p_aes_dev Date: Fri, 17 Mar 2017 16:49:21 +0200 Message-Id: <20170317144922.27379-4-krzk@kernel.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170317144922.27379-1-krzk@kernel.org> References: <20170317144922.27379-1-krzk@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add kernel-doc to s5p_aes_dev structure. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz --- drivers/crypto/s5p-sss.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 35ea84b7d775..7ac657f46d15 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -170,6 +170,32 @@ struct s5p_aes_ctx { int keylen; }; +/** + * struct s5p_aes_dev - Crypto device state container + * @dev: Associated device + * @clk: Clock for accessing hardware + * @ioaddr: Mapped IO memory region + * @aes_ioaddr: Per-varian offset for AES block IO memory + * @irq_fc: Feed control interrupt line + * @req: Crypto request currently handled by the device + * @ctx: Configuration for currently handled crypto request + * @sg_src: Scatter list with source data for currently handled block + * in device. This is DMA-mapped into device. + * @sg_dst: Scatter list with destination data for currently handled block + * in device. This is DMA-mapped into device. + * @sg_src_cpy: In case of unaligned access, copied scatter list + * with source data. + * @sg_dst_cpy: In case of unaligned access, copied scatter list + * with destination data. + * @tasklet: New request scheduling jib + * @queue: Crypto queue + * @busy: Indicates whether the device is currently handling some request + * thus it uses some of the fields from this state, like: + * req, ctx, sg_src/dst (and copies). This essentially + * protects against concurrent access to these fields. + * @lock: Lock for protecting both access to device hardware registers + * and fields related to current request (including the busy field). + */ struct s5p_aes_dev { struct device *dev; struct clk *clk; @@ -182,7 +208,6 @@ struct s5p_aes_dev { struct scatterlist *sg_src; struct scatterlist *sg_dst; - /* In case of unaligned access: */ struct scatterlist *sg_src_cpy; struct scatterlist *sg_dst_cpy;