From patchwork Wed Dec 18 13:06:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 11300663 Return-Path: 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 B00A4921 for ; Wed, 18 Dec 2019 13:06:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8C5732176D for ; Wed, 18 Dec 2019 13:06:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tKexbuFz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k7GOlgqx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C5732176D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=Ie7WclEf/S2K9Bac/3f0IrLJav7FHIJqpQncCF68nqo=; b=tKexbuFz98kAMh taAlnTr4ngq+DPZA/nZlnSp9nKePx7fjcuTLd5gvBtQeVhfDGCp8zvHjBybzia/7O8orFfDnP3yjz zOxwyjIpjgoNtWhLZWXDaiPdt8vM4ihI9Lns7GQpaJ0o+TVgG2VNhoCECvz+NUb3m46O4WjTLWOv4 ieGJbnXyFJmAOjeQr9RDcKhhbLMwHTU8Ilne5Q4zmf6nt4NTolbbKuW2o8eCgrc/7xWxlCzpDVM/W XYz9mKN0Vx6jymMV9E1j1Ysgkc+hevgcc7nHewDQQZyFMUG4+eKfQ/SkA2uvDCaCuH9PS8yJXWRVB WtusFh9fqHSNaL/VWILA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihZ28-0001yQ-LM; Wed, 18 Dec 2019 13:06:32 +0000 Received: from mail-yw1-xc41.google.com ([2607:f8b0:4864:20::c41]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihZ26-0001xh-7K for linux-arm-kernel@lists.infradead.org; Wed, 18 Dec 2019 13:06:31 +0000 Received: by mail-yw1-xc41.google.com with SMTP id h126so719329ywc.6 for ; Wed, 18 Dec 2019 05:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LLIjdUM214rts+QdFmLT0qdowpwm43aLvVt9JtuWnSI=; b=k7GOlgqxBrb7DrpjWzIRp+jbycjd5MM/XzKtDlUMxHwrUIXuBXNcVEDICBqRGEJtPs lS0/nCcvc1fRc0JI+PfYd+v/L1SoiwfhttrM7O+4gXbSI55qZkJpOQZf+XhF0jes4YXk 8Pq7nmCmI1wZgSbmlPdn+aLh3W8SqwV1MdiiNMN4ye6CwjFBu6cWQzT2D/+3nUeJg48O /G2xqSbfH0pczNadzW+gfMhW40fV/8Cz2PFtRoWPatMgYbnMWWlRthAv3ao1Ft1ytePU PTSeq/oFPE08p59UWxEsxEk0PkvWeTSOk2IsdBR+Mv5yyfviPNmC29W87cPPPdyvwAQp 1WtA== 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:mime-version :content-transfer-encoding; bh=LLIjdUM214rts+QdFmLT0qdowpwm43aLvVt9JtuWnSI=; b=kUPC3mBnrbxQ+X3egCSbjXHzWjUeZtvDev7b71ZeZXWzZEXa88TiNiP6YcM4B/rnXH DE9bz2h1DcpUMbVugJad2dQsbc0OgWOtQFG2DSkA3iInhvI+6LlNozzeqdSvJbDOCCO3 K/aGR7FnwLKKOEEtMOqPsqVmYfQ6tvuyytjU8Ydl2CwxWiwDrLJeV9VjA4RliEPAETna GiEgTCg2fWhl+9EmBQa0wip57q/AVlavt/CP3jLBiPVRPrp3AGXxyDDW9epsU2/9J2st V2V+DGM6Ut33GG64tyUdk84sCQSjlmkfyy0Vd5C8CF7rf7TS1HKMYntLbjvH/S+e3Q9b m7aQ== X-Gm-Message-State: APjAAAVLZQogv1/F0oIyZbEgc6J4If8E09Xeg5sMyYlu6xJPkQuIwP5L DtP/3BIwwqh1iRgGy/BJ/X9eAEZZGHg= X-Google-Smtp-Source: APXvYqzBCz5/Y3IeMZDESTHiuAl8EZLblP3IJZCPORJ/K5z1qkW5EVc4+ZaGd3Qy/EH9AeRJOGyGQw== X-Received: by 2002:a81:b60d:: with SMTP id u13mr1834559ywh.382.1576674388055; Wed, 18 Dec 2019 05:06:28 -0800 (PST) Received: from localhost.localdomain (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id r64sm909603ywg.84.2019.12.18.05.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 05:06:27 -0800 (PST) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V3 1/3] crypto: caam: Add support for i.MX8M Mini Date: Wed, 18 Dec 2019 07:06:14 -0600 Message-Id: <20191218130616.13860-1-aford173@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_050630_262869_217138EE X-CRM114-Status: GOOD ( 13.68 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:c41 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (aford173[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (aford173[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Mark Rutland , Aymen Sghaier , Fabio Estevam , Herbert Xu , =?utf-8?q?Horia_Geant=C4=83?= , devicetree@vger.kernel.org, Iuliana Prodan , Shawn Guo , Sascha Hauer , linux-kernel@vger.kernel.org, Will Deacon , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Catalin Marinas , Adam Ford , "David S. Miller" , linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but the driver is restricting the check to just the i.MX8MQ. This patch expands the check for either i.MX8MQ or i.MX8MM. Signed-off-by: Adam Ford Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Reviewed-by: Horia Geantă --- V3: No Change V2: Expand the check that forces the setting on imx8mq to also be true for imx8mm Explictly state imx8mm compatiblity instead of making it generic to all imx8m* this is mostly due to lack of other hardware to test diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index d7c3c3805693..c01dda692ecc 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -102,7 +102,8 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc, * Apparently on i.MX8MQ 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,imx8mq") || + of_machine_is_compatible("fsl,imx8mm")) { clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0); while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) && @@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = { { .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 }, { .family = "Freescale i.MX" }, { /* sentinel */ } };