Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1139446ybl; Fri, 6 Dec 2019 11:56:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxO2J7qUH9O/RGJvwTQ2Q8CUiq0UU2rxN6d6K0Hk2KehF/fsMT7rzgI3vWxH10mOU53cOtp X-Received: by 2002:a05:6830:16d0:: with SMTP id l16mr12822051otr.176.1575662182154; Fri, 06 Dec 2019 11:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575662182; cv=none; d=google.com; s=arc-20160816; b=0DWZrTC6qJsvlvWHnva0C5Kq6HlwRAD+XYkPu/OJ30oR9g6OPezzT/EA0Up0kv3yHJ pe5RT1mp1qKWpnrfkCYzL7jJmcy8376l5vYoRvY/15aWfWIJDaqDTSZfLgsOJIojLpug 1UZNeCGpbhGLZiQzhrtZqzO+3rgE+dPBOrK4v+z0cSn9ZMBPDwMdqP3Bydh6iCKMWBb+ RLF2O7SXoi81Elljs2K3BMdIv4hd7Ww6n53f3tn3a0KnlGJKTRMPY8Y/Ljlgmofr9lqh pA8JZuHM89GHqdE9btYKHJX+NTfrlfa1k70AKd7tsRr8Tq1pzE886NRajvbqefP4TBxY pazA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DTgSv4IR0PpwmqQTfS7L4oC63RYA+jjFi0H391aqaRo=; b=Xmj4qL/amxoWAT3DlcFRa+in6WBiawtZtArVLD+HHzM0A55qxK/kzXBoLnZeB29Q6m GmDSkElw5JTbojvgAuCPwFYgTulheWKQjFG2wbcfPfucMt1Wp5dnniqlY85oTF1tGu2q Ya+toa/U+IDWGt7OYfzKIRu3TitU9yYfJ/0VFnJRh3hR6dhC6NvrwZ+0O7D75/b+JJaf 5cDw24oRiZB8Rr67vR6djZiWQeMzuHcfR2QoyJg1Kq1G7BiTnt2hmyp4lz3zJQDSMWfz iAGjcxQgYr9SoVm4U9HOdUzN3WKuRC4l5dwvN/cfOLFp2EcjhV7uL0vuvkdYfIH2hriT +VCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FoabJm/V"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6si8072428oth.315.2019.12.06.11.56.01; Fri, 06 Dec 2019 11:56:22 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FoabJm/V"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726370AbfLFTz4 (ORCPT + 99 others); Fri, 6 Dec 2019 14:55:56 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:40657 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbfLFTzz (ORCPT ); Fri, 6 Dec 2019 14:55:55 -0500 Received: by mail-il1-f196.google.com with SMTP id b15so7256592ila.7; Fri, 06 Dec 2019 11:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DTgSv4IR0PpwmqQTfS7L4oC63RYA+jjFi0H391aqaRo=; b=FoabJm/VAHEA72IkwsIyNnv2Lb0OAfzfxwsi0xcKcZSGC/zIOq4hoVvRBGyq823LgA 5QvG4cpHa9qGCS74ERmwipoNQna4LCng8AHcMhbc9m4BhXQOHxQ6mvZZKk2bfFIAgEz5 yCdmoq909w9OxHbSYp6/VZGJWug7Qzv815CNhPRhlrmZQyJsut/ofMwtRpnhdfr7L7wq e3kd9xPjIxAq2hPa/iqD9PA8SldEqPRF8KjCeHFmqZPRC67+2/7pHKP/RieCINQwe0Sq slOAoDOnpoUgeBlKBoO7eu77aInhlnhWoBvQWjxkNfgsBIjtEme8zib6OybCBex/+M/j 8jrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DTgSv4IR0PpwmqQTfS7L4oC63RYA+jjFi0H391aqaRo=; b=IqvrTrTMHwXnenBcq54jPxyCDc+Hr1tArxiBtAiBkJpY7zkW9EngArG82STfRPtEVh DZuqVHzKSPZZnr+JB1oLfVHKTdCSH1J2zZmPuP1fVe66efuVmGyekiAX61w4GWkNWZhl sF4uE2BYdM8tXoqtmxNWJAELxUJMYJKsKJYCaDePyxXbedCBPzQ0M338cU4kHiwqNWEb AzMR9GKZTkCR2F07m+VUqvsBKNvZ2BVM2n+dm/XVgvLVotRvj3tvTnpPkcyvAPs50AH+ XnLn120sml3RE7lDr6vNfZDfSofMocl3J5WWN2RPYEypsg6xI7xP0h9GxqqBfWqQNGAk m1NQ== X-Gm-Message-State: APjAAAVue1tbEoRUZeNbZmc54dsnfaSTV3zuWdn2VliibsW4jPjbKe5y WgqHJv/rbsdI+3n7WwYk2+3MM0pJDVf/Zp0e/Dc= X-Received: by 2002:a92:1588:: with SMTP id 8mr15690935ilv.276.1575662154375; Fri, 06 Dec 2019 11:55:54 -0800 (PST) MIME-Version: 1.0 References: <20191130225153.30111-1-aford173@gmail.com> In-Reply-To: From: Adam Ford Date: Fri, 6 Dec 2019 13:55:43 -0600 Message-ID: Subject: Re: [PATCH 1/2] crypto: caam: Change the i.MX8MQ check support all i.MX8M variants To: Schrempf Frieder Cc: "linux-crypto@vger.kernel.org" , Mark Rutland , Aymen Sghaier , Fabio Estevam , Herbert Xu , =?UTF-8?Q?Horia_Geant=C4=83?= , "devicetree@vger.kernel.org" , Sascha Hauer , "linux-kernel@vger.kernel.org" , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , "David S. Miller" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 4, 2019 at 5:38 AM Schrempf Frieder wrote: > > Hi Adam, > > On 30.11.19 23:51, Adam Ford wrote: > > 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 lets the driver support all i.MX8M Variants if enabled. > > > > Signed-off-by: Adam Ford > > What about the following lines in run_descriptor_deco0()? Does this > condition also apply to i.MX8MM? I think that's a question for NXP. I am not seeing that in the NXP Linux Release, and I don't have an 8MQ to compare. I was able to get the driver working on the i.MXMM with the patch. NXP Team, Do you have any opinions on this? adam > > drivers/crypto/caam/ctrl.c: > > if (ctrlpriv->virt_en == 1 || > /* > * 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")) { > clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0); > > while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) && > --timeout) > cpu_relax(); > > timeout = 100000; > } > > Regards, > Frieder > > > > > diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c > > index db22777d59b4..1ce03f8961b6 100644 > > --- a/drivers/crypto/caam/ctrl.c > > +++ b/drivers/crypto/caam/ctrl.c > > @@ -527,7 +527,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.MX8M*", .data = &caam_imx7_data }, > > { .family = "Freescale i.MX" }, > > { /* sentinel */ } > > }; > >