Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A16E4C433E1 for ; Fri, 21 Aug 2020 13:46:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 70B152078D for ; Fri, 21 Aug 2020 13:46:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OR8PrYKJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Rtq/FY2b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70B152078D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RnIKCgPKxIlI9nQDC2AehTnkwgHmLKlTdP74Eg7h2AE=; b=OR8PrYKJNf9cEW1ekiRH3bixOE u2PcxuYWUPBcYjCmu4vowb3W2Uf6iCXA2OgNdr14kcwn/V4zzwHJn9vjY5jAnmXulb4oERWIonImX EtyFILxEW+o6indp9Ksb4M8SgG24vBHerc9wsSFoUqap/GWTIAOjZuFs6Ddfr/F/XNAbGnoQFoRMy xa31PitT2p83u0Dh4sDYmus+9ANPdyGQXj9WegfX9tNcwnVp4YhOnIApHjzLbmsvLm7Kpn0zRPc+A u4IZ/sjHSahfpL7gqHHof0GXbaZgLhZUuhzzqsNDN39h1sGjFA254cvuf+UAyV/bBYiX8qwl3Ge13 iVnTV45A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k97Lc-0007as-RU; Fri, 21 Aug 2020 13:44:48 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k97Kl-0007IO-OT for linux-arm-kernel@lists.infradead.org; Fri, 21 Aug 2020 13:43:59 +0000 Received: by mail-wr1-x442.google.com with SMTP id r15so1953428wrp.13 for ; Fri, 21 Aug 2020 06:43:55 -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=Rtq/FY2b1l/uTm1zqNRGcMOki4Nhr90y8dw36UY9OBKk1wt7vX9yWf/ZMj8F+6xtXq YTDbvFOBtAQxU0LR/qyk8fPz3GIwtOZ1BwetfUi54GgTFgw0LXoscAtctxcy/NbeVmSs jL1O0aWDIjWryXP/AC6K36dEYxdJROGpH6SJumsBWX43dt7wuubHClbboH8u2l0Pulp4 ByImav3DVG+N+1lu6hF2URdYdoJwFU/fbyRYjDz2WQ2v9jXCoP8yXCjn1sIIdxc/m7dx w6Kq+OPApVJFC+Uv4qarFCiViA0ogUwrEp3N00AGK4BjWl4epMnx14/4RpgghfJoHAS3 9RvQ== 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=oKE0ah6vi2L4iZXANy82lex9IVpuQ5J36550j77tg9pxTpNUUrPefCEHBWSvg7WD6Y 7ymWkSqBiby0BR+vrEA6Nm0DHD8BFyyV954GvDwt4F0I3s3k90E1vxTJSRyrx2Fz2WSQ ihLtM1od+9Fd+NEYQTLdaoABRBPxVWmsvOfwaF1k43sq38zqrUQzYR09XXiULFJf6PQh kBcDUyQBgxu31ozNlPCpXRJc8YM4dNqD+d8HD6H3PHpbjerBOp9URUE77MtbNRWi/fue JdN4gMEQ44jlESqXclwAr3Q+H4qBJWrwoxVyBTlOU8C51tICvyrIPE4MHCiy+I+y1UBS EOng== X-Gm-Message-State: AOAM532/99L91k/WZBLcJuPoklzXI8YVt14P0m2PeewcXrYSNUgfDpeS mGeOqG9aLtHPIXIJEFbC2zOahg== X-Google-Smtp-Source: ABdhPJz3B6InTIkOYqEFv4i/KcOzpg+W9FPTs9aKP7I5q6ENyn3219x88CEP/HrtsXh7inepIEQzFA== X-Received: by 2002:a5d:4281:: with SMTP id k1mr2763001wrq.30.1598017434935; Fri, 21 Aug 2020 06:43:54 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id 202sm5971179wmb.10.2020.08.21.06.43.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Aug 2020 06:43:54 -0700 (PDT) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Subject: [PATCH v5 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Fri, 21 Aug 2020 13:43:28 +0000 Message-Id: <1598017415-39059-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598017415-39059-1-git-send-email-clabbe@baylibre.com> References: <1598017415-39059-1-git-send-email-clabbe@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200821_094355_848372_3BB3AD7E X-CRM114-Status: GOOD ( 18.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corentin Labbe , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel