[EXT] Re: [PATCH 05/15] i.MX6: Enable Job ring driver model in U-Boot.
Gaurav Jain
gaurav.jain at nxp.com
Thu Aug 19 08:05:20 CEST 2021
Hello Sean
> -----Original Message-----
> From: Sean Anderson <sean.anderson at seco.com>
> Sent: Tuesday, August 17, 2021 9:51 PM
> To: Gaurav Jain <gaurav.jain at nxp.com>; u-boot at lists.denx.de; Franck
> Lenormand <franck.lenormand at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>; Fabio Estevam <festevam at gmail.com>;
> Peng Fan <peng.fan at nxp.com>; Simon Glass <sjg at chromium.org>; Priyanka
> Jain <priyanka.jain at nxp.com>; Ye Li <ye.li at nxp.com>; Horia Geanta
> <horia.geanta at nxp.com>; Ji Luo <ji.luo at nxp.com>; Silvano Di Ninno
> <silvano.dininno at nxp.com>; Sahil Malhotra <sahil.malhotra at nxp.com>; Pankaj
> Gupta <pankaj.gupta at nxp.com>; Varun Sethi <V.Sethi at nxp.com>; dl-uboot-imx
> <uboot-imx at nxp.com>; Shengzhou Liu <shengzhou.liu at nxp.com>; Mingkai Hu
> <mingkai.hu at nxp.com>; Rajesh Bhagat <rajesh.bhagat at nxp.com>; Meenakshi
> Aggarwal <meenakshi.aggarwal at nxp.com>; Wasim Khan
> <wasim.khan at nxp.com>; Alison Wang <alison.wang at nxp.com>; Pramod
> Kumar <pramod.kumar_1 at nxp.com>; Andy Tang <andy.tang at nxp.com>;
> Adrian Alonso <adrian.alonso at nxp.com>; Vladimir Oltean <olteanv at gmail.com>
> Subject: [EXT] Re: [PATCH 05/15] i.MX6: Enable Job ring driver model in U-Boot.
>
> Caution: EXT Email
>
> On 8/16/21 4:42 AM, Gaurav Jain wrote:
> > i.MX6(SX/UL) - 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 at nxp.com>
> > ---
> > arch/arm/mach-imx/mx6/Kconfig | 8 ++++++++
> > arch/arm/mach-imx/mx6/soc.c | 15 +++++++++++----
> > 2 files changed, 19 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/mach-imx/mx6/Kconfig
> > b/arch/arm/mach-imx/mx6/Kconfig index 789a50d4e9..a7109bb512 100644
> > --- a/arch/arm/mach-imx/mx6/Kconfig
> > +++ b/arch/arm/mach-imx/mx6/Kconfig
> > @@ -378,6 +378,10 @@ config TARGET_MX6SXSABRESD
> > select DM
> > select DM_THERMAL
> > select SUPPORT_SPL
> > + select FSL_CAAM
> > + select FSL_BLOB
> > + select MISC
> > + select ARCH_MISC_INIT
> >
> > config TARGET_MX6SXSABREAUTO
> > bool "mx6sxsabreauto"
> > @@ -405,6 +409,10 @@ config TARGET_MX6UL_14X14_EVK
> > select DM_THERMAL
> > select SUPPORT_SPL
> > imply CMD_DM
> > + select FSL_CAAM
> > + select FSL_BLOB
> > + select MISC
> > + 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 aacfc854a2..3d8f649c23 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,8 @@
> > #include <asm/arch/mxc_hdmi.h>
> > #include <asm/arch/crm_regs.h>
> > #include <dm.h>
> > -#include <fsl_sec.h>
> > +#include <dm/uclass-internal.h>
> > +#include <dm/device-internal.h>
> > #include <imx_thermal.h>
> > #include <mmc.h>
> >
> > @@ -734,9 +736,14 @@ static void setup_serial_number(void)
> >
> > int arch_misc_init(void)
> > {
> > -#ifdef CONFIG_FSL_CAAM
> > - sec_init();
> > -#endif
> > + struct udevice *dev;
> > +
> > + uclass_find_first_device(UCLASS_MISC, &dev);
> > + for (; dev; uclass_find_next_device(&dev)) {
> > + if (device_probe(dev))
> > + continue;
> > + }
>
> Can you just do
>
> uclass_get_device_by_driver(UCLASS_MISC, DM_GET_DRIVER(caam_jr),
> &dev);
>
> instead of probing all MISC devices?
>
I will make the suggested change in the version 2 of the patches.
Regards
Gaurav Jain
> > +
> > setup_serial_number();
> > return 0;
> > }
> >
More information about the U-Boot
mailing list