diff mbox series

[RFC,1/4] crypto: caam - fix detection of i.MX8 SoC

Message ID 20190222100613.2290-2-christopher.spencer@sea.co.uk (mailing list archive)
State RFC
Delegated to: Herbert Xu
Headers show
Series crypto: caam - Add i.MX8MQ support | expand

Commit Message

Chris Spencer Feb. 22, 2019, 10:06 a.m. UTC
From: Chris Spencer <christopher.spencer@sea.co.uk>

The i.MX8 does not currently have an SoC driver so soc_device_match does
not recognise it. Check the machine compatible instead.

Signed-off-by: Chris Spencer <christopher.spencer@sea.co.uk>
---
 drivers/crypto/caam/ctrl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chris Spencer Feb. 25, 2019, 7:50 a.m. UTC | #1
On Fri, 22 Feb 2019 at 10:07, <spencercw@gmail.com> wrote:
> From: Chris Spencer <christopher.spencer@sea.co.uk>
>
> The i.MX8 does not currently have an SoC driver so soc_device_match does
> not recognise it. Check the machine compatible instead.
>
> Signed-off-by: Chris Spencer <christopher.spencer@sea.co.uk>

Turns out there is already an outstanding patch to add the SoC driver
[1], so I will drop this one from the next version.

Chris

[1] https://lore.kernel.org/patchwork/patch/1038272/
diff mbox series

Patch

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 16bbc72f041a..22cb7106133a 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -513,7 +513,8 @@  static int caam_probe(struct platform_device *pdev)
 	dev_set_drvdata(dev, ctrlpriv);
 	nprop = pdev->dev.of_node;
 
-	caam_imx = (bool)soc_device_match(imx_soc);
+	caam_imx = soc_device_match(imx_soc) ||
+		of_machine_is_compatible("fsl,imx8mq");
 
 	/* Enable clocking */
 	clk = caam_drv_identify_clk(&pdev->dev, "ipg");