Message ID | 1600413795-39256-8-git-send-email-clabbe@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=p7Vf=C3=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E505C6CA for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 Sep 2020 07:24:35 +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 9588521734 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 Sep 2020 07:24:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Bla8ObJn"; 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="15Lw0w/D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9588521734 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+patchwork-linux-arm=patchwork.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=wFRSFFg4fDnfMMveopb5belYydF2+wF1jTc/vOTxYNg=; b=Bla8ObJnaiADOI6tkWWS5+VjxB vv4Y83RDK5nTwg8lRjwXhfYO2zMbpt/hsI1bwaG+9X5EK7N2oFUCJIgj6yVaIP1jnk5lIOELuEJmN wy03gFuYtR5qTwkZll13zhhEzM5T5h7nynYMaFr/dB3ApEhMDoj4wePLLOMakeYkMsgUUJzhLVTRK ZDUXmQSejAlyi/oLw0CKbi3xwhUNGZkKwx7RnG2YxwIlHpxzuQ0J+mAvrTUoulo4Ypekrltdzd+Go X9C5MkMJnA8fSW3OoxUltERIlhK1bkTML5X8e1+x+E5rDojoP60X7E1M67fyq9ZbSh83aKftqZg4T UMZzT2nQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJAki-0000kr-QZ; Fri, 18 Sep 2020 07:24:16 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJAk1-0000XV-Su for linux-arm-kernel@lists.infradead.org; Fri, 18 Sep 2020 07:23:39 +0000 Received: by mail-wm1-x343.google.com with SMTP id y15so4469666wmi.0 for <linux-arm-kernel@lists.infradead.org>; Fri, 18 Sep 2020 00:23:33 -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=thgOsxp+Xq4BrFvbMKlBsMkOaotb5Mf5M65feuQsl1g=; b=15Lw0w/Dv1oD9BPmxmyBukpkJeQWTO9fcY1tUj7eh0sOyFr8HK20/cOzmL9U9v/fAS gZdeCmUpmD6AmP/hXZSf9zElisfE7iSbWXr0MRv765Zy4EoMOzzGbwkdWnlC9Vk24KDl y9AHI2A/OGRnm/8JptKsDnJBBHQL8sinwF+qdVmr0lhIQzlLRBPCScV2AbuWbHWpnTYo mze28Rs0v0NpD6rz7WnRKSHB/nlQh99FwDeuXE8TIWf1QP/PMOH1dL+/D6qQ8uKSez0B GmU9ITp7m+KtRnoH9K1c/EizvzaS398ZFqs8IcNwIBU53pkk+fjWNejs4ESLSQCvIowG B94Q== 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=thgOsxp+Xq4BrFvbMKlBsMkOaotb5Mf5M65feuQsl1g=; b=L/s+J2PrKcrGzLPXH85TYq+UeD3hWtyxd5qX2fitx8TqHGQbIgMuKYzrSCn9TL9V3o PhaTBzc0KrA9gOyvHT0l/HpLzu+24r4hNQpooLRBIttWEUnUmqdNUfyTDfy9eyZD8+/y YMSWlPBy99vaW2ng4Wz1VWNJKtBiCU2keCpPaWvRzwzDxZDNd6r/Kis6MpRXtvzutHf+ 88LBAsR4OjCz9u2aKiLeFFIRBdVmhJj21p9Fcc0LC243lXzXdJ077YnQiaJgQyW6bRGj 6ivU2B3TPWYJRuv8yrDEZOoJvbdDdF2jS0ZQWMtYTytnJQ8zzDsUcJuUjMRCdT6DiQR5 Hzig== X-Gm-Message-State: AOAM532cBsrWb3gF4m0gYQOymR2OTpfR+cDCp32P+jLri/wWbtwc28pv Ol7Mdqr9D0IG321QsghlNpln3g== X-Google-Smtp-Source: ABdhPJzZ6lmTRQWpdoOt6MPjdP2mXcVZoxwSWh5PFOqfTuKO1P6x8PWE+OyeHa79wKYuUwb+VGRPfg== X-Received: by 2002:a1c:3985:: with SMTP id g127mr14614813wma.32.1600413812991; Fri, 18 Sep 2020 00:23:32 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id z19sm3349546wmi.3.2020.09.18.00.23.32 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2020 00:23:32 -0700 (PDT) From: Corentin Labbe <clabbe@baylibre.com> To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Subject: [PATCH v7 07/17] crypto: sun8i-ce: handle endianness of t_common_ctl Date: Fri, 18 Sep 2020 07:23:05 +0000 Message-Id: <1600413795-39256-8-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200918_032334_021499_F8C2ECAE X-CRM114-Status: GOOD ( 14.99 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Corentin Labbe <clabbe@baylibre.com>, linux-sunxi@googlegroups.com, 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" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
crypto: allwinner: add xRNG and hashes
|
expand
|
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 138759dc8190..08ed1ca12baf 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c @@ -120,7 +120,10 @@ int sun8i_ce_run_task(struct sun8i_ce_dev *ce, int flow, const char *name) /* Be sure all data is written before enabling the task */ wmb(); - v = 1 | (ce->chanlist[flow].tl->t_common_ctl & 0x7F) << 8; + /* Only H6 needs to write a part of t_common_ctl along with "1", but since it is ignored + * on older SoCs, we have no reason to complicate things. + */ + v = 1 | ((le32_to_cpu(ce->chanlist[flow].tl->t_common_ctl) & 0x7F) << 8); writel(v, ce->base + CE_TLR); mutex_unlock(&ce->mlock);
t_common_ctl is LE32 so we need to convert its value before using it. This value is only used on H6 (ignored on other SoCs) and not handling the endianness cause failure on xRNG/hashes operations on H6 when running BE. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe <clabbe@baylibre.com> --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)