All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaurav Jain <gaurav.jain@nxp.com>
To: u-boot@lists.denx.de, Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@nxp.com>,
	Simon Glass <sjg@chromium.org>, Michael Walle <michael@walle.cc>,
	Priyanka Jain <priyanka.jain@nxp.com>, Ye Li <ye.li@nxp.com>,
	Horia Geanta <horia.geanta@nxp.com>, Ji Luo <ji.luo@nxp.com>,
	Franck Lenormand <franck.lenormand@nxp.com>,
	Silvano Di Ninno <silvano.dininno@nxp.com>,
	Sahil malhotra <sahil.malhotra@nxp.com>,
	Pankaj Gupta <pankaj.gupta@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
	Shengzhou Liu <Shengzhou.Liu@nxp.com>,
	Mingkai Hu <mingkai.hu@nxp.com>,
	Rajesh Bhagat <rajesh.bhagat@nxp.com>,
	Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>,
	Wasim Khan <wasim.khan@nxp.com>,
	Alison Wang <alison.wang@nxp.com>,
	Pramod Kumar <pramod.kumar_1@nxp.com>,
	Tang Yuantian <andy.tang@nxp.com>,
	Adrian Alonso <adrian.alonso@nxp.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	ZHIZHIKIN Andrey <andrey.zhizhikin@leica-geosystems.com>,
	Michael Trimarchi <michael@amarulasolutions.com>,
	Gaurav Jain <gaurav.jain@nxp.com>
Subject: [PATCH v11 05/14] i.MX6: Enable Job ring driver model.
Date: Thu, 24 Mar 2022 11:50:29 +0530	[thread overview]
Message-ID: <20220324062038.2187-6-gaurav.jain@nxp.com> (raw)
In-Reply-To: <20220324062038.2187-1-gaurav.jain@nxp.com>

i.MX6,i.MX6SX,i.MX6UL - added support for JR driver model.

removed sec_init() call, sec is initialized based on
job ring information processed from device tree.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
---
 arch/arm/mach-imx/mx6/Kconfig | 10 ++++++++++
 arch/arm/mach-imx/mx6/soc.c   | 13 +++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 98df4d4e42..3d675fcd73 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -354,6 +354,8 @@ config TARGET_MX6SABREAUTO
 	select DM_THERMAL
 	select SUPPORT_SPL
 	imply CMD_DM
+	select FSL_CAAM
+	select ARCH_MISC_INIT
 
 config TARGET_MX6SABRESD
 	bool "mx6sabresd"
@@ -364,6 +366,8 @@ config TARGET_MX6SABRESD
 	select DM_THERMAL
 	select SUPPORT_SPL
 	imply CMD_DM
+	select FSL_CAAM
+	select ARCH_MISC_INIT
 
 config TARGET_MX6SLEVK
 	bool "mx6slevk"
@@ -386,6 +390,8 @@ config TARGET_MX6SXSABRESD
 	select DM
 	select DM_THERMAL
 	select SUPPORT_SPL
+	select FSL_CAAM
+	select ARCH_MISC_INIT
 
 config TARGET_MX6SXSABREAUTO
 	bool "mx6sxsabreauto"
@@ -404,6 +410,8 @@ config TARGET_MX6UL_9X9_EVK
 	select DM_THERMAL
 	select SUPPORT_SPL
 	imply CMD_DM
+	select FSL_CAAM
+	select ARCH_MISC_INIT
 
 config TARGET_MX6UL_14X14_EVK
 	bool "mx6ul_14x14_evk"
@@ -413,6 +421,8 @@ config TARGET_MX6UL_14X14_EVK
 	select DM_THERMAL
 	select SUPPORT_SPL
 	imply CMD_DM
+	select FSL_CAAM
+	select ARCH_MISC_INIT
 
 config TARGET_MX6UL_ENGICAM
 	bool "Support Engicam GEAM6UL/Is.IoT"
diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index 03d6b8c1ce..2434bcfa98 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -4,6 +4,7 @@
  * Sascha Hauer, Pengutronix
  *
  * (C) Copyright 2009 Freescale Semiconductor, Inc.
+ * Copyright 2021 NXP
  */
 
 #include <common.h>
@@ -23,7 +24,6 @@
 #include <asm/arch/mxc_hdmi.h>
 #include <asm/arch/crm_regs.h>
 #include <dm.h>
-#include <fsl_sec.h>
 #include <imx_thermal.h>
 #include <mmc.h>
 
@@ -738,9 +738,14 @@ static void setup_serial_number(void)
 
 int arch_misc_init(void)
 {
-#ifdef CONFIG_FSL_CAAM
-	sec_init();
-#endif
+	if (IS_ENABLED(CONFIG_FSL_CAAM)) {
+		struct udevice *dev;
+		int ret;
+
+		ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
+		if (ret)
+			printf("Failed to initialize %s: %d\n", dev->name, ret);
+	}
 	setup_serial_number();
 	return 0;
 }
-- 
2.17.1


  parent reply	other threads:[~2022-03-24  6:22 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24  6:20 [PATCH v11 00/14] Add CAAM driver model support Gaurav Jain
2022-03-24  6:20 ` [PATCH v11 01/14] crypto/fsl: Add support for CAAM Job ring driver model Gaurav Jain
2022-03-28  8:36   ` Gaurav Jain
2022-03-28 13:52     ` Michael Nazzareno Trimarchi
2022-04-11 18:43   ` Stefano Babic
2022-04-12  7:20     ` [EXT] " Gaurav Jain
2022-04-12  7:34       ` Stefano Babic
2022-04-12 13:34   ` sbabic
     [not found]   ` <7d0648b0-338d-4b01-9da5-269c7cea0031@VE1EUR01FT051.eop-EUR01.prod.protection.outlook.com>
2022-04-13  5:35     ` [EXT] " Gaurav Jain
2022-04-13  6:57       ` Stefano Babic
2022-03-24  6:20 ` [PATCH v11 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 03/14] crypto/fsl: i.MX8M: Enable Job ring driver model Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 04/14] mx6sabre: Remove unnecessary SPL configs Gaurav Jain
2022-04-12 13:33   ` sbabic
2022-03-24  6:20 ` Gaurav Jain [this message]
2022-04-12 13:34   ` [PATCH v11 05/14] i.MX6: Enable Job ring driver model sbabic
2022-03-24  6:20 ` [PATCH v11 06/14] i.MX7: " Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 07/14] i.MX7ULP: " Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 08/14] i.MX8: Add crypto node in device tree Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 09/14] crypto/fsl: i.MX8: Enable Job ring driver model Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 10/14] Layerscape: Add crypto node in device tree Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 11/14] Layerscape: Enable Job ring driver model Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 12/14] PPC: Add crypto node in device tree Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 13/14] PPC: Enable Job ring driver model Gaurav Jain
2022-04-12 13:34   ` sbabic
2022-03-24  6:20 ` [PATCH v11 14/14] update CAAM MAINTAINER Gaurav Jain
2022-04-12 13:34   ` sbabic

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=20220324062038.2187-6-gaurav.jain@nxp.com \
    --to=gaurav.jain@nxp.com \
    --cc=Shengzhou.Liu@nxp.com \
    --cc=V.Sethi@nxp.com \
    --cc=adrian.alonso@nxp.com \
    --cc=alison.wang@nxp.com \
    --cc=andrey.zhizhikin@leica-geosystems.com \
    --cc=andy.tang@nxp.com \
    --cc=festevam@gmail.com \
    --cc=franck.lenormand@nxp.com \
    --cc=horia.geanta@nxp.com \
    --cc=ji.luo@nxp.com \
    --cc=meenakshi.aggarwal@nxp.com \
    --cc=michael@amarulasolutions.com \
    --cc=michael@walle.cc \
    --cc=mingkai.hu@nxp.com \
    --cc=olteanv@gmail.com \
    --cc=pankaj.gupta@nxp.com \
    --cc=peng.fan@nxp.com \
    --cc=pramod.kumar_1@nxp.com \
    --cc=priyanka.jain@nxp.com \
    --cc=rajesh.bhagat@nxp.com \
    --cc=sahil.malhotra@nxp.com \
    --cc=sbabic@denx.de \
    --cc=silvano.dininno@nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=wasim.khan@nxp.com \
    --cc=ye.li@nxp.com \
    /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.