Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1236396pxk; Fri, 4 Sep 2020 04:32:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy/WhYgK8odDYU/JeEzvwQQDgkv0fnsIDQakY6Qkgm12MO9VEnk/MkzL1Y/5zmu3RKfR3e X-Received: by 2002:a17:906:cb94:: with SMTP id mf20mr7233985ejb.8.1599219178939; Fri, 04 Sep 2020 04:32:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599219178; cv=none; d=google.com; s=arc-20160816; b=ZqaqSWvDFKYZgHlCVIMXAUH3qcNtVZhbgdLY0elniCiNiNNcIQKNpLtSBXlfzUbG25 I1Fm+uzxqvflmHsrt9pUOnO/toX2fKtwNzbaiVqnDPVxTuj6X+AyqL2quNttLyeOxtT6 Av9Q6BcuE0+dG0M4FSsF5i0OftDlS0Xgzf1kl32ME+bi6em2buUtii1izWurei4yXY6A cVNsL02jxAH9PES0y+Nu98qEYH29gU1cxmI94/BDfSgyd59jRUEAcXIzOZrSYIxxfRM9 zRT8NepHLW2Eo3+OH/aJOf0O0DGKfigAyYOUxt+tDw9wnwqcAymAxctmV3ToKSeMbiiB p3Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gSXaIPMXv2p2JdvokUaT0GeoWLMWWGeoBVt/sDwVK3w=; b=LGQ+YbRkgNOWDvaVWvSAI8i/j1mdrBFIc+CteGZgJK+T0eYCht0eTBEW3h7AUqCWfn hBv9qUl7WuAoYQLkM4Lu7Y4jQ8tMFytQ7RcS4DxaXNLb4EH/Vs7MGbW7XufzUE5oTrlc 4Ik/YtHOoxLSPfSNYs5r6wnhdSJnLrR5d+9BymJ+hk0MDSs4mX1rg/JsBoUlPvHB6zEh /c4FXs2dfhKGhTuxUdi9J3kQSJZdTWOy07Yv4DnRyqsOVs49zzfxLDTg90Eh/6QvEDeP ddz1uRVPXCnXE5yJLwwHfO/tsZnP0C2lPM2DMUZQNE70oT7nkl3bSij6Np1kOZDtp7aN J+jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OQ2AQpv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l19si4093021ejq.87.2020.09.04.04.32.36; Fri, 04 Sep 2020 04:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OQ2AQpv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730095AbgIDL3v (ORCPT + 99 others); Fri, 4 Sep 2020 07:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730188AbgIDL0C (ORCPT ); Fri, 4 Sep 2020 07:26:02 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F014DC06121A for ; Fri, 4 Sep 2020 04:10:24 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id l9so5700240wme.3 for ; Fri, 04 Sep 2020 04:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gSXaIPMXv2p2JdvokUaT0GeoWLMWWGeoBVt/sDwVK3w=; b=OQ2AQpv0aDDax25XCFXNkwjgsdSc8WwGSK4ROJFMz71nXGrRDgIJ+EOiHW3Z+i4L82 odgYoN6Uc30ot7WECybBG4kn9bAv0tgD5+jqxRmWu5h7Xk75D1kZLKuozG/Svcf8CQuJ OzVUppruRVyFXLo1r8boA5lxh1ubE3USunjg2ctM74bJX/ToxjOpMiYGbBN0Nb+GWNzv UVUaJp9Rp7bXw261E5c4tpmPFEq6OYp4NDmbNgj2KEy9N3nSmnYw0m999nlZ86Dbd9f3 CkgTvF8+jNZjfZUF0bcxtqNtbLimACP7MYYXKZiKb/5gCmdopvfQqdJFAKI2eyEvy7lR e4sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gSXaIPMXv2p2JdvokUaT0GeoWLMWWGeoBVt/sDwVK3w=; b=twM8u0kWN6L+X5FsglV89mum+/+S36wT9518KpJ/TgO5TsgUPIDltbjRcbsb+ax37n 8olIWc3PMNTZiDxYjxhJTJRWEEy2mqdno2VFoNH0y5NVlOBY99CJsbpHtOfPTn06hI+S a8250WfMKxUJTDegfepGQd6/CtVpyIhT2/oi+McOzStWWHy1VVMT2cG3iQFju4429w2X BW0Z2NEXARTjzLzScjDX819OXWiBdCL8rEFI6Nyo5JIbZkJw6lqql6UvvTwWvMtXP8Ha 2m+qFK4Y4B36x+JB5iEFkcyRKQDOT4EgzbizwYI6VXeTZsEhpDHDwlB01VRyQv4wpq0g lZyQ== X-Gm-Message-State: AOAM533OdZ35xs/BTO69PYvKXG99NKYE4JWWUkgHo/BvXQNyMcUF6shz j+TxYal85yzrKRk4iCDTE5kKSQ== X-Received: by 2002:a1c:9883:: with SMTP id a125mr7454711wme.133.1599217823242; Fri, 04 Sep 2020 04:10:23 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id m3sm10622743wmb.26.2020.09.04.04.10.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2020 04:10:22 -0700 (PDT) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v6 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Fri, 4 Sep 2020 11:09:56 +0000 Message-Id: <1599217803-29755-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599217803-29755-1-git-send-email-clabbe@baylibre.com> References: <1599217803-29755-1-git-send-email-clabbe@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 2 +- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index fa12c966c45f..2dcf508b0f18 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -119,7 +119,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req common |= rctx->op_dir | CE_COMM_INT; cet->t_common_ctl = cpu_to_le32(common); /* CTS and recent CE (H6) need length in bytes, in word otherwise */ - if (ce->variant->has_t_dlen_in_bytes) + if (ce->variant->cipher_t_dlen_in_bytes) cet->t_dlen = cpu_to_le32(areq->cryptlen); else cet->t_dlen = cpu_to_le32(areq->cryptlen / 4); diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 65748dfa7a48..688976011f07 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c @@ -61,7 +61,7 @@ static const struct ce_variant ce_h6_variant = { }, .op_mode = { CE_OP_ECB, CE_OP_CBC }, - .has_t_dlen_in_bytes = true, + .cipher_t_dlen_in_bytes = true, .ce_clks = { { "bus", 0, 200000000 }, { "mod", 300000000, 0 }, diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h index eea0847dc1e8..3dbf8ca47b7c 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h @@ -97,7 +97,7 @@ struct ce_clock { * @alg_cipher: list of supported ciphers. for each CE_ID_ this will give the * coresponding CE_ALG_XXX value * @op_mode: list of supported block modes - * @has_t_dlen_in_bytes: Does the request size for cipher is in + * @cipher_t_dlen_in_bytes: Does the request size for cipher is in * bytes or words * @ce_clks: list of clocks needed by this variant * @esr: The type of error register @@ -105,7 +105,7 @@ struct ce_clock { struct ce_variant { char alg_cipher[CE_ID_CIPHER_MAX]; u32 op_mode[CE_ID_OP_MAX]; - bool has_t_dlen_in_bytes; + bool cipher_t_dlen_in_bytes; struct ce_clock ce_clks[CE_MAX_CLOCKS]; int esr; }; -- 2.26.2