[PATCH v5 13/16] Layerscape: Enable Job ring driver model in U-Boot.

Michael Walle michael at walle.cc
Tue Nov 16 12:20:59 CET 2021


> LS(1021/1012/1028/1043/1046/1088/2088), LX2160, LX2162
> platforms are enabled with JR driver model.
> 
> removed sec_init() call from board files.
> removed CONFIG_FSL_CAAM from defconfig files.
> sec is initialized based on job ring information processed
> from device tree.
> 
> Signed-off-by: Gaurav Jain <gaurav.jain at nxp.com>
> Reviewed-by: Priyanka Jain <priyanka.jain at nxp.com>
> ---
>  arch/arm/cpu/armv7/ls102xa/Kconfig            |  4 +++
>  arch/arm/cpu/armv7/ls102xa/cpu.c              | 16 +++++++++++
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig     | 27 +++++++++++++++++++
>  arch/arm/cpu/armv8/fsl-layerscape/cpu.c       | 10 ++++++-
>  board/freescale/ls1012afrdm/ls1012afrdm.c     |  7 +----
>  board/freescale/ls1012aqds/ls1012aqds.c       |  6 +----
>  board/freescale/ls1012ardb/ls1012ardb.c       |  6 +----
>  board/freescale/ls1021aiot/ls1021aiot.c       |  6 ++---
>  board/freescale/ls1021aqds/ls1021aqds.c       |  6 +----
>  board/freescale/ls1021atsn/ls1021atsn.c       |  7 ++---
>  board/freescale/ls1021atwr/ls1021atwr.c       |  8 ++----
>  board/freescale/ls1028a/ls1028a.c             |  6 +----
>  board/freescale/ls1043ardb/ls1043ardb.c       |  6 +----
>  board/freescale/ls1046afrwy/ls1046afrwy.c     |  7 +----
>  board/freescale/ls1046aqds/ls1046aqds.c       |  7 +----
>  board/freescale/ls1046ardb/ls1046ardb.c       |  6 +----
>  board/freescale/ls1088a/ls1088a.c             |  6 +----
>  board/freescale/ls2080aqds/ls2080aqds.c       |  6 +----
>  board/freescale/ls2080ardb/ls2080ardb.c       |  9 +------
>  board/freescale/lx2160a/lx2160a.c             |  5 ----
>  configs/ls1021aiot_qspi_defconfig             |  1 -
>  configs/ls1021aqds_nor_defconfig              |  1 -
>  configs/ls1021aqds_qspi_defconfig             |  1 -
>  configs/ls1021atsn_qspi_defconfig             |  1 -
>  configs/ls1021atwr_nor_defconfig              |  1 -
>  ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig |  1 +
>  configs/ls1028ardb_tfa_defconfig              |  1 -
>  configs/ls1043ardb_tfa_defconfig              |  1 -
>  configs/ls1046afrwy_tfa_defconfig             |  1 -
>  configs/ls1046aqds_tfa_defconfig              |  1 -
>  configs/ls1046ardb_tfa_defconfig              |  1 -
>  configs/ls2088aqds_tfa_defconfig              |  1 -
>  configs/ls2088ardb_tfa_defconfig              |  1 -
>  configs/lx2160aqds_tfa_defconfig              |  1 -
>  configs/lx2160ardb_tfa_defconfig              |  1 -
>  configs/lx2162aqds_tfa_defconfig              |  1 -
>  36 files changed, 75 insertions(+), 102 deletions(-)

board/kontron/sl28/sl28.c fixes are missing here. With this patch
applied I'll get the following error during boot:

U-Boot 2022.01-rc2-00026-gf82ded5126-dirty (Nov 16 2021 - 11:16:40 +0100)

SoC:  LS1028A Rev1.0 (0x870b0110)
Clock Configuration:
       CPU0(A72):1300 MHz  CPU1(A72):1300 MHz  
       Bus:      400  MHz  DDR:      1600 MT/s
Reset Configuration Word (RCW):
       00000000: 34004010 00000030 00000000 00000000
       00000010: 00000000 008f0000 0030c000 00000000
       00000020: 06200000 00002580 00000000 00019016
       00000030: 00000000 00000048 00000000 00000000
       00000040: 00000000 00000000 00000000 00000000
       00000050: 00000000 00000000 00000000 00000000
       00000060: 00000304 00000000 000e7000 00000000
       00000070: bb580000 00020000
Model: Kontron SMARC-sAL28 (Dual PHY)
EL:    3
CPLD:  v64
DRAM:  4 GiB (DDR3, 32-bit, CL=11, ECC on)
caam_jr: caam not found

^^ this error.

please add the following hunk to this patch:

diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c
index 9572502499..555e831f2a 100644
--- a/board/kontron/sl28/sl28.c
+++ b/board/kontron/sl28/sl28.c
@@ -31,9 +31,6 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
-       if (CONFIG_IS_ENABLED(FSL_CAAM))
-               sec_init();
-
        return 0;
 }

>  config ARCH_LS1028A
> @@ -53,6 +57,9 @@ config ARCH_LS1028A
>  	select SYS_FSL_ERRATUM_A011334
>  	select SYS_FSL_ESDHC_UNRELIABLE_PULSE_DETECTION_WORKAROUND
>  	select RESV_RAM if GIC_V3_ITS
> +	select FSL_CAAM
> +	select FSL_BLOB
> +	select MISC

There are boards like the sl28 which also have ARCH_LS1028A set and
doesn't depend on neither FSL_CAAM nor FSL_BLOB. Please don't set
this per architecture. Both should be set by the individual boards
instead as they are optional and having this here will just increase
binary size.

Of course this is like to be true for all ARCH_LSxxx Kconfig options.

>  	imply PANIC_HANG 

-michael


More information about the U-Boot mailing list