[PATCH v2 06/15] i.MX7: Enable Job ring driver model in U-Boot.

Ye Li ye.li at nxp.com
Fri Sep 10 11:36:12 CEST 2021


On Fri, 2021-09-03 at 12:33 +0530, Gaurav Jain wrote:
> 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 at nxp.com>

Reviewed-by: Ye Li <ye.li at nxp.com>

Best regards,
Ye Li

> ---
>  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 af7aad3f9e..addd349e54 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -860,7 +860,7 @@ config ARCH_MX7
>  	select ARCH_MISC_INIT
>  	select CPU_V7A
>  	select GPIO_EXTRA_HEADER
> -	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 adedc01164..b82338e2cc 100644
> --- a/arch/arm/mach-imx/mx7/Kconfig
> +++ b/arch/arm/mach-imx/mx7/Kconfig
> @@ -60,6 +60,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 fda25ba66a..26b00bc93f 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>
> @@ -18,7 +19,6 @@
>  #include <dm.h>
>  #include <env.h>
>  #include <imx_thermal.h>
> -#include <fsl_sec.h>
>  #include <asm/setup.h>
>  #include <linux/delay.h>
>  
> @@ -336,6 +336,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
>  	if (is_mx7d())
>  		env_set("soc", "imx7d");
> @@ -343,9 +346,9 @@ int arch_misc_init(void)
>  		env_set("soc", "imx7s");
>  #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;
>  }


More information about the U-Boot mailing list