Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21824192ybl; Mon, 6 Jan 2020 12:02:27 -0800 (PST) X-Google-Smtp-Source: APXvYqy3dhsJ7KRAtqHHFXGIcNulBLvJ5j9Bd4GK7tx9Y6969AJEx3OvynucTTb0DOC97x2ho7iY X-Received: by 2002:aca:b608:: with SMTP id g8mr6608565oif.142.1578340946983; Mon, 06 Jan 2020 12:02:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578340946; cv=none; d=google.com; s=arc-20160816; b=Y8ui+rsyS3YlQJSe2TTSBdoFjxRS4PF4499/e1eA+E3FSyaLIFhMCpRr2rF0R9cDsH hAjrRsAmKWNN2pG7hZoDLppaCQCViK9ho6rmRXkRO+T1NzFxVUx2DE0/KYaYCPbT9Y0s jcVIuc0E/N9+77Arhc3HIACfvGvfPFPx5SfA3oBm6KsxW61NfxqgOVPQzWVVPUhK/JAD vqmU2acpr4pHbOzQafK/4RdTo9OCsPK9RJihBYMCuDHaPTGtLp9fVGb5QsTA7scRLjyA 7zTKT6LKUIV38xKK9EmQjMmQ1gsnPwxteDRBNrK04WDRJPH/fd0tqX3uF9KAryl6bZeR VRvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=lqMyrJ5+mBtQOaH9Shr+07lBdAkVBcb09TD3HF93cFs=; b=xOhSTBCoOU43gyCkKYKtSutMghZPEIeSnu0tq+9GOambZPNkp5sYpOIJeAb02r/eSD mRqy71T4ZiReGJN+Juvf6pUf0oWtN1qWCtwoCLTABieii1JCUlvmFx1GescfFB0TkjKs XZJ6doNB2eNVuHDlQ1K4qOriek8A0IdPJAfxfva9y6NjtSy8yk4R/2coBCRpW74fOzj9 J91L+aIZLok+df7RdGaHszlbfwIIcPcTfOW2W5yh+9WM8s9ZA4Yd30QXT34QTTD0B87l DO0IDQAGaElEyNeGQhXcU1KIgkUMu4f+WfZXrdUpx/dWN8cYLzYGRZ3sTOG3sjuU1tKU 0t2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si31125955oix.48.2020.01.06.12.02.05; Mon, 06 Jan 2020 12:02:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbgAFUCD (ORCPT + 99 others); Mon, 6 Jan 2020 15:02:03 -0500 Received: from inva020.nxp.com ([92.121.34.13]:45910 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726569AbgAFUCD (ORCPT ); Mon, 6 Jan 2020 15:02:03 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 860DB1A0E48; Mon, 6 Jan 2020 21:02:00 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 794061A0E3F; Mon, 6 Jan 2020 21:02:00 +0100 (CET) Received: from fsr-ub1864-014.ea.freescale.net (fsr-ub1864-014.ea.freescale.net [10.171.95.219]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 0284C203CC; Mon, 6 Jan 2020 21:01:59 +0100 (CET) From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Shawn Guo , Sascha Hauer , Herbert Xu Cc: "David S. Miller" , Aymen Sghaier , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] crypto: caam - add support for i.MX8M Nano Date: Mon, 6 Jan 2020 22:01:53 +0200 Message-Id: <20200106200154.30643-1-horia.geanta@nxp.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add support for the crypto engine used in i.mx8mn (i.MX 8M "Nano"), which is very similar to the one used in i.mx8mq, i.mx8mm. Since the clocks are identical for all members of i.MX 8M family, simplify the SoC <--> clock array mapping table. Signed-off-by: Horia Geantă --- drivers/crypto/caam/ctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 6659c8d9672e..88a58a8fc533 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -99,11 +99,12 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc, if (ctrlpriv->virt_en == 1 || /* - * Apparently on i.MX8MQ it doesn't matter if virt_en == 1 + * Apparently on i.MX8MQ, 8MM, 8MN it doesn't matter if virt_en == 1 * and the following steps should be performed regardless */ of_machine_is_compatible("fsl,imx8mq") || - of_machine_is_compatible("fsl,imx8mm")) { + of_machine_is_compatible("fsl,imx8mm") || + of_machine_is_compatible("fsl,imx8mn")) { clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0); while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) && @@ -509,8 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = { { .soc_id = "i.MX6UL", .data = &caam_imx6ul_data }, { .soc_id = "i.MX6*", .data = &caam_imx6_data }, { .soc_id = "i.MX7*", .data = &caam_imx7_data }, - { .soc_id = "i.MX8MQ", .data = &caam_imx7_data }, - { .soc_id = "i.MX8MM", .data = &caam_imx7_data }, + { .soc_id = "i.MX8M*", .data = &caam_imx7_data }, { .family = "Freescale i.MX" }, { /* sentinel */ } }; -- 2.17.1