All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>
To: shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com,
	aymen.sghaier@nxp.com, herbert@gondor.apana.org.au,
	davem@davemloft.net, dominique.martinet@atmark-techno.com
Cc: linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: [PATCH v1 2/2] caam: imx8m: change to use of_match_node in run_descriptor_deco0
Date: Thu, 29 Apr 2021 22:02:50 +0800	[thread overview]
Message-ID: <20210429140250.2321-2-alice.guo@oss.nxp.com> (raw)
In-Reply-To: <20210429140250.2321-1-alice.guo@oss.nxp.com>

From: Alice Guo <alice.guo@nxp.com>

Patch "fix the built-in caam driver cannot match soc_id" provides
imx8m_machine_match to match i.MX8M{Q,M,N,P}, so change to use to
of_match_node which can simplify the code.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
 drivers/crypto/caam/ctrl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 9bba3b93cf35..7e6a525e0c11 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -113,10 +113,7 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
 	     * Apparently on i.MX8M{Q,M,N,P} 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,imx8mn") ||
-	    of_machine_is_compatible("fsl,imx8mp")) {
+	    of_match_node(imx8m_machine_match, of_root)) {
 		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);

 		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
--
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>
To: shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, horia.geanta@nxp.com,
	aymen.sghaier@nxp.com, herbert@gondor.apana.org.au,
	davem@davemloft.net, dominique.martinet@atmark-techno.com
Cc: linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org
Subject: [PATCH v1 2/2] caam: imx8m: change to use of_match_node in run_descriptor_deco0
Date: Thu, 29 Apr 2021 22:02:50 +0800	[thread overview]
Message-ID: <20210429140250.2321-2-alice.guo@oss.nxp.com> (raw)
In-Reply-To: <20210429140250.2321-1-alice.guo@oss.nxp.com>

From: Alice Guo <alice.guo@nxp.com>

Patch "fix the built-in caam driver cannot match soc_id" provides
imx8m_machine_match to match i.MX8M{Q,M,N,P}, so change to use to
of_match_node which can simplify the code.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
---
 drivers/crypto/caam/ctrl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 9bba3b93cf35..7e6a525e0c11 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -113,10 +113,7 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
 	     * Apparently on i.MX8M{Q,M,N,P} 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,imx8mn") ||
-	    of_machine_is_compatible("fsl,imx8mp")) {
+	    of_match_node(imx8m_machine_match, of_root)) {
 		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);

 		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
--
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-29 14:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 14:02 [PATCH v1 1/2] caam: imx8m: fix the built-in caam driver cannot match soc_id Alice Guo (OSS)
2021-04-29 14:02 ` Alice Guo (OSS)
2021-04-29 14:02 ` Alice Guo (OSS) [this message]
2021-04-29 14:02   ` [PATCH v1 2/2] caam: imx8m: change to use of_match_node in run_descriptor_deco0 Alice Guo (OSS)
2021-04-29 14:04   ` Fabio Estevam
2021-04-29 14:04     ` Fabio Estevam
2021-04-29 15:22     ` Alice Guo (OSS)
2021-04-29 15:22       ` Alice Guo (OSS)
2021-04-30  6:10 ` [PATCH v1 1/2] caam: imx8m: fix the built-in caam driver cannot match soc_id Dominique Martinet
2021-04-30  6:10   ` Dominique Martinet
2021-05-03 10:07 ` Frieder Schrempf
2021-05-03 10:07   ` Frieder Schrempf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210429140250.2321-2-alice.guo@oss.nxp.com \
    --to=alice.guo@oss.nxp.com \
    --cc=aymen.sghaier@nxp.com \
    --cc=davem@davemloft.net \
    --cc=dominique.martinet@atmark-techno.com \
    --cc=festevam@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.