Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp992921pxk; Fri, 18 Sep 2020 00:25:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyzHiwqRnjADkPaGvZU9/PMWKTwGnqYOvvUfjqeak+J3DG6sAS/6nAQTCPo1dPpdkzeeJl X-Received: by 2002:a50:8524:: with SMTP id 33mr38379999edr.123.1600413959288; Fri, 18 Sep 2020 00:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600413959; cv=none; d=google.com; s=arc-20160816; b=H2j1M4k5cjIXkbyBjtMOUA9MlbTMkYQRBBl3YXYBj/CNnIvS5Sf9TNHYfn5TX/BAdv HsMtAs2bhvWbDDJHM7PY3z5x8WJ7MX834TCVwUKAFKAZ8my2zzq6kSDj8UNRPD7Jc0Im VQY9YfY8AmZzc+mMKfmDrglLdZum8rkJ+J7zX/UAC+0x51CFBRLEmbZ4n8VhFd7EaUWk PBlrmORHnmyodmz93keBRvV4A0ZSKSmZQDcqcfHng85CI6UI8Yxu3Apg4wDA+jupFV8E UQZoCWw/XpvbDMhakpcSWzI7ixjlVqeO9zk/TVbSwsOFiGVbq3P2LjwF/sr+xasy5/24 dDOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=Hi9tYbpGxDCHNvNclhCZQ2pZw/5KARTnXlMj7WGllS0=; b=qhPojOGlnup4IKNp5pNtV+T/hnS/397ZvLyTZ86988Pk6WIDfy9++SonHTT4O5XBCN QQ19QLOfCIH6kwy+XwIcY0wluhxbhqeYZ8HNg3oNa6SGY3lM4yScOMgwUBT5FPyF2n4/ 2d5QqRlq+2vhWPX/omwE0Fb9pTKUgkgQv+kfBWwmqf+9KrEnoDZvmd+Ua6qCWJQfrvk8 HdUytNn41KWocsrXml3DQf5k1xKYKOxquBKYmmVTK5ur9LgaVmzqhV8/J54+uYVOwmxJ 6KA1JLsYJ5HZ2lwNnt0jAxxv8sWeLnSzHz63OOVKcW7WATb02QMW37ZnnBWzLGXLbSEq NJ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=jZoTvwM0; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 w16si1626572eds.210.2020.09.18.00.25.35; Fri, 18 Sep 2020 00:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=jZoTvwM0; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgIRHYb (ORCPT + 99 others); Fri, 18 Sep 2020 03:24:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726610AbgIRHXj (ORCPT ); Fri, 18 Sep 2020 03:23:39 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3EE1C06178B for ; Fri, 18 Sep 2020 00:23:38 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id z9so4471869wmk.1 for ; Fri, 18 Sep 2020 00:23:38 -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=Hi9tYbpGxDCHNvNclhCZQ2pZw/5KARTnXlMj7WGllS0=; b=jZoTvwM0v35r4ji2h3cvZ2WrsWKsriPxIGu3WApmdv1y5xFUHGn8lLRQDHhaXguVHR TVWY3N+4LtRkxFWUBLGO345I4h/TcudfTvdgR5u+im2JRZe66oSFBh/bjDDIhLV6qgzz MSrAhDGOEnjuhjnBmmFeim6tfV7iDCorXVNUJBbX1MMehQkC+ReeRN3VXrkZdI1QvqpD IKysRRPBsiC9dm/FXFtNovsV15KiXzHl4q3SU3WFxrgZ9DyKDpjKMWjtQq9epqXky6jT vuXdf1KSnAR2n6JyeNQ5b9K5jO1YN1/u6lOSK7faKjUC4HKiH+Dfew9xKPPmL5ltNeK9 etHA== 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=Hi9tYbpGxDCHNvNclhCZQ2pZw/5KARTnXlMj7WGllS0=; b=t1J3IRj+/TCYkoPLDlBEm3JmnR4zafOnC3bmENoxSwQ8hot8stsbyn2ItQj/qfNJM2 2PiLpo19vusJaifJsc/ogMxKcmRcS4tU5JJxMANYY0xo0r7i2DeC0w94XzYP8mnUIR+x sxEtlkU1jIfVMPGHUrjNpy7oRaSOsNrSHa8jryahwI17H4MckhmkTyGykF7XfIYQhk1s scBmwgoy7IG34XCSwv6mG6VncOxxJxz5Uty/fqWE9ru8eQO34guT/A20YtsGxdOt2nXU Tnpv/ebM1LpH1mEm8hpz8fxh2dmxZsPhaXB6SzmZzneDQEVfJ39qi9wg9Y7Jjpdh9lpB Tv5w== X-Gm-Message-State: AOAM532MQZqW1olZUb8D0buGiV4zkUXclp0NcUdZcmWquX0l4ftuQoRR 7HqAean8LWWOysaH/Bg3Mv5qnw== X-Received: by 2002:a7b:c111:: with SMTP id w17mr14622505wmi.28.1600413817698; Fri, 18 Sep 2020 00:23:37 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id z19sm3349546wmi.3.2020.09.18.00.23.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2020 00:23:36 -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 v7 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Fri, 18 Sep 2020 07:23:09 +0000 Message-Id: <1600413795-39256-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600413795-39256-1-git-send-email-clabbe@baylibre.com> References: <1600413795-39256-1-git-send-email-clabbe@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@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 cae307e6bcac..33707a2e55ff 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -118,7 +118,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 6e191d1fa140..0b513771498a 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