All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaurav Jain <gaurav.jain@nxp.com>
To: u-boot@lists.denx.de
Cc: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@nxp.com>,
	Simon Glass <sjg@chromium.org>,
	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>,
	Gaurav Jain <gaurav.jain@nxp.com>
Subject: [PATCH v6 06/15] i.MX7: Enable Job ring driver model in U-Boot.
Date: Tue, 30 Nov 2021 16:10:39 +0530	[thread overview]
Message-ID: <20211130104048.6207-7-gaurav.jain@nxp.com> (raw)
In-Reply-To: <20211130104048.6207-1-gaurav.jain@nxp.com>

i.MX7D - 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/Kconfig              |  2 +-
 arch/arm/mach-imx/mx7/Kconfig |  3 +++
 arch/arm/mach-imx/mx7/soc.c   | 11 +++++++----
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 550f884077..516e1b5a8f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -883,7 +883,7 @@ config ARCH_MX7
 	select CPU_V7A
 	select GPIO_EXTRA_HEADER
 	select MACH_IMX
-	select SYS_FSL_HAS_SEC if IMX_HAB
+	select SYS_FSL_HAS_SEC
 	select SYS_FSL_SEC_COMPAT_4
 	select SYS_FSL_SEC_LE
 	imply BOARD_EARLY_INIT_F
diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig
index 0cad825287..d8f748a544 100644
--- a/arch/arm/mach-imx/mx7/Kconfig
+++ b/arch/arm/mach-imx/mx7/Kconfig
@@ -68,6 +68,9 @@ config TARGET_MX7DSABRESD
 	select DM_THERMAL
 	select MX7D
 	imply CMD_DM
+	select FSL_CAAM
+	select FSL_BLOB
+	select MISC
 
 config TARGET_PICO_IMX7D
 	bool "pico-imx7d"
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index 21690072e1..6c991a6cb1 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Copyright 2021 NXP
  */
 
 #include <common.h>
@@ -19,7 +20,6 @@
 #include <dm.h>
 #include <env.h>
 #include <imx_thermal.h>
-#include <fsl_sec.h>
 #include <asm/setup.h>
 #include <linux/delay.h>
 
@@ -337,6 +337,9 @@ int arch_cpu_init(void)
 #ifdef CONFIG_ARCH_MISC_INIT
 int arch_misc_init(void)
 {
+	struct udevice *dev;
+	int ret;
+
 #ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 	struct tag_serialnr serialnr;
 	char serial_string[0x20];
@@ -353,9 +356,9 @@ int arch_misc_init(void)
 	env_set("serial#", serial_string);
 #endif
 
-#ifdef CONFIG_FSL_CAAM
-	sec_init();
-#endif
+	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);
 
 	return 0;
 }
-- 
2.17.1


  parent reply	other threads:[~2021-11-30 10:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 10:40 [PATCH v6 00/15] Add CAAM driver model support Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 01/15] crypto/fsl: Add support for CAAM Job ring driver model Gaurav Jain
2021-12-01  6:26   ` Simon Glass
2021-12-01 11:54     ` [EXT] " Gaurav Jain
2021-12-01 18:02       ` Simon Glass
2021-12-06  5:38         ` Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 02/15] i.MX8M: crypto: updated device tree for supporting DM in SPL Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 03/15] crypto/fsl: i.MX8M: Enable Job ring driver model in SPL and U-Boot Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 04/15] mx6sabre: Remove unnecessary SPL configs Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 05/15] i.MX6: Enable Job ring driver model in U-Boot Gaurav Jain
2021-11-30 10:40 ` Gaurav Jain [this message]
2021-11-30 10:40 ` [PATCH v6 07/15] i.MX7ULP: " Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 08/15] i.MX8: Add crypto node in device tree Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 09/15] crypto/fsl: i.MX8: Enable Job ring driver model in SPL and U-Boot Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 10/15] crypto/fsl: Improve hwrng performance in kernel Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 11/15] Layerscape: Add crypto node in device tree Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 12/15] Layerscape: Enable Job ring driver model in U-Boot Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 13/15] PPC: Add crypto node in device tree Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 14/15] PPC: Enable Job ring driver model in U-Boot Gaurav Jain
2021-11-30 10:40 ` [PATCH v6 15/15] update CAAM MAINTAINER Gaurav Jain

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=20211130104048.6207-7-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=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=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.