Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp960772ybh; Tue, 21 Jul 2020 12:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUhG1JznMC1yAD+8THOKHRvbdvBj/aiZ1l0oi60RRW88X4k+eia5SQDXALPg85QyHM7Y64 X-Received: by 2002:a17:906:fcba:: with SMTP id qw26mr26056261ejb.112.1595358527027; Tue, 21 Jul 2020 12:08:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595358527; cv=none; d=google.com; s=arc-20160816; b=svpT30BYyPlaXYRtmH3aARVWHouDwUHeOb6xWw+smDMrcj22VuqavZiGcu4WRAt7Wh eobwirrWA5oBaLo2a96J9dSTZhoU1NKjN9IuQejGrkJF1Ii0FN4KAdmwhMRviAr+GuXC xK09nj1YP1Bo+aamo1tCEMfTsiBaeG+te3Ru1p/Rym/JBCXBF3WxyE6Xs5p2oe1ffvZV FQWfGRx1rdWkF4+nbxh/v4bVJYfP6cfGVcXXRg/jVGJAuM2MJ39IjNAJA8uEaV+z+BmX 2JG6q7S/kkVWwOeUU1Ux9ZVGbsoYDs72RvzCYzZOIvGuwLsEiggu2ojmA0FSuhGvjfnz oi/A== 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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=rfW87HqEqZFlG0Zz3k7mMIwmOV/7VDJaEvfNx9py0s+Xps4gGPaDpfr3A23stNGrjW /Z6/tlieyUHkKfi2296d5BA7Mse43/5ZKiNFi+gnRNDNuPi9J9rCTtdJ2YZa5saKpjvy SefOQ1NaKWLOAXS6rkVwHp7vXY8C0rPVLyz4oy3zgObFc3iU9pX4+yvBzr24A/h5XvMC lKnePwe3d1zoagSxr5+EkD6ZWQBOaB08pK4DHrr5+CbzaiNTjEulnRRi02/ueYgUsJZf vDi8BCnpiMyMrw2Yw8ZeAGRvWaJmCaDWerDmHrMZ4+LSNzen7YAQ37s9BDRbRzxXOGAp uqgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=m1KZnXuN; 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 k4si12640891eds.446.2020.07.21.12.08.23; Tue, 21 Jul 2020 12:08:47 -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=m1KZnXuN; 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 S1730735AbgGUTHp (ORCPT + 99 others); Tue, 21 Jul 2020 15:07:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730389AbgGUTGx (ORCPT ); Tue, 21 Jul 2020 15:06:53 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 387A0C05BD0F for ; Tue, 21 Jul 2020 12:06:53 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id 88so11943466wrh.3 for ; Tue, 21 Jul 2020 12:06:53 -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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=m1KZnXuNUVbBvZhFNWCDC9GibXG8kn2La7zpp3vY38Gy9Cf4u6JQYGxg0X0pI0nvFl rNQtzF5nI/1fRnCshLvo7TSOoVxusaYR0WCRm/JW4fdlB020XpGh1HAxKMJvgGT70fks oCvAtKllhcjKE22qO84UHiLnWEf0iEs+kmgMlYlcdpQrRiLTdFj2H1+ImPjlPtNe9JVm W9qqBpWuKdpSMPEBdxPhy7c0Bbvmvr+FukwRGWL0gZIiilnQmOGowHeCp2fjvxmxJKyk mlZZAGMjFxtzPIN9/WO1F4HevQVp1MPquHP7/k+xWttv/giY+VjoPnhA4vovC5dm5wal l3xQ== 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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=kiGY5Urw4BHyD06loGPcRaxXKjkDu+H8BOrAKffvkWR//RquxrtrXqmcUyxGNOPe8X 8OlYnKp0HpBRnoFzRUMYImx2apmlS5Dbpy1QCngr5cjuMDvZMr3WP0yq+bJO/8smPIyl 1tOua2CO5hAl9xEbiuzjNyEWbTpnd4Dpw/ScoxV2ZvCHeOeDgG3vO7mJvEdHSWyVsUcK rdj4tZfU9LqtMqBASDcx3uKiEYlqwDZK1TvZa2T+d7LexG7nQb+pZ92yCsGw0GYH+zK7 FTVCI9X7D2udPdg4gPEUo/yvV7VJDYs7ggF5Hy0Hk2W+48vBJbpEjMLffWYtNSPdzK5x M8QA== X-Gm-Message-State: AOAM53132vhkW9Qvgeyq9q8hCHpzvNp5sxaGZjvLhH+Y8V9AHaSmLO5R O6ZAG5MPks4tVN8iLBArZvYxoQ== X-Received: by 2002:adf:9e8b:: with SMTP id a11mr5377184wrf.309.1595358411966; Tue, 21 Jul 2020 12:06:51 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id s14sm25794848wrv.24.2020.07.21.12.06.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2020 12:06:51 -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, Corentin Labbe Subject: [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Tue, 21 Jul 2020 19:06:25 +0000 Message-Id: <1595358391-34525-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> References: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> Sender: linux-crypto-owner@vger.kernel.org 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 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 4cc98180be3f..de4d70f87a9c 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