PPC: Enable Job ring driver model.
authorGaurav Jain <gaurav.jain@nxp.com>
Thu, 24 Mar 2022 06:20:37 +0000 (11:50 +0530)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Apr 2022 09:20:30 +0000 (11:20 +0200)
removed sec_init() call from board files.
sec is initialized based on job ring information processed
from device tree.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
41 files changed:
arch/powerpc/cpu/mpc85xx/cpu_init.c
arch/powerpc/include/asm/u-boot-ppc.h [new file with mode: 0644]
arch/powerpc/include/asm/u-boot.h
configs/P2041RDB_NAND_defconfig
configs/P2041RDB_SDCARD_defconfig
configs/P2041RDB_SPIFLASH_defconfig
configs/P2041RDB_defconfig
configs/P3041DS_NAND_defconfig
configs/P3041DS_SDCARD_defconfig
configs/P3041DS_SPIFLASH_defconfig
configs/P3041DS_defconfig
configs/P4080DS_SDCARD_defconfig
configs/P4080DS_SPIFLASH_defconfig
configs/P4080DS_defconfig
configs/P5040DS_NAND_defconfig
configs/P5040DS_SDCARD_defconfig
configs/P5040DS_SPIFLASH_defconfig
configs/P5040DS_defconfig
configs/T1024RDB_NAND_defconfig
configs/T1024RDB_SDCARD_defconfig
configs/T1024RDB_SPIFLASH_defconfig
configs/T1024RDB_defconfig
configs/T1042D4RDB_NAND_defconfig
configs/T1042D4RDB_SDCARD_defconfig
configs/T1042D4RDB_SPIFLASH_defconfig
configs/T1042D4RDB_defconfig
configs/T2080QDS_NAND_defconfig
configs/T2080QDS_SDCARD_defconfig
configs/T2080QDS_SPIFLASH_defconfig
configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
configs/T2080QDS_defconfig
configs/T2080RDB_NAND_defconfig
configs/T2080RDB_SDCARD_defconfig
configs/T2080RDB_SPIFLASH_defconfig
configs/T2080RDB_defconfig
configs/T2080RDB_revD_NAND_defconfig
configs/T2080RDB_revD_SDCARD_defconfig
configs/T2080RDB_revD_SPIFLASH_defconfig
configs/T2080RDB_revD_defconfig
configs/T4240RDB_SDCARD_defconfig
configs/T4240RDB_defconfig

index e9e133b..16981de 100644 (file)
@@ -56,6 +56,7 @@
 #ifdef CONFIG_U_QE
 #include <fsl_qe.h>
 #endif
+#include <dm.h>
 
 #ifdef CONFIG_SYS_FSL_SINGLE_SOURCE_CLK
 /*
@@ -902,8 +903,6 @@ int cpu_init_r(void)
 #endif
 
 #ifdef CONFIG_FSL_CAAM
-       sec_init();
-
 #if defined(CONFIG_ARCH_C29X)
        if ((SVR_SOC_VER(svr) == SVR_C292) ||
            (SVR_SOC_VER(svr) == SVR_C293))
@@ -942,6 +941,22 @@ int cpu_init_r(void)
        return 0;
 }
 
+#ifdef CONFIG_ARCH_MISC_INIT
+int arch_misc_init(void)
+{
+       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);
+       }
+
+       return 0;
+}
+#endif
+
 void arch_preboot_os(void)
 {
        u32 msr;
diff --git a/arch/powerpc/include/asm/u-boot-ppc.h b/arch/powerpc/include/asm/u-boot-ppc.h
new file mode 100644 (file)
index 0000000..372ca3e
--- /dev/null
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright 2021 NXP
+ *
+ * Gaurav Jain <gaurav.jain@nxp.com>
+ */
+
+#ifndef _U_BOOT_PPC_H_
+#define _U_BOOT_PPC_H_
+
+#ifndef __ASSEMBLY__
+
+int arch_misc_init(void);
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _U_BOOT_PPC_H_ */
index 19b3c0d..36af8e5 100644 (file)
@@ -21,5 +21,6 @@
 /* Use the generic board which requires a unified bd_info */
 #include <asm-generic/u-boot.h>
 #include <asm/ppc.h>
+#include <asm/u-boot-ppc.h>
 
 #endif /* __U_BOOT_H__ */
index 9c94522..34afc45 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xFFA00C21
 CONFIG_SYS_OR0_PRELIM=0xFFFC0796
index 30145cc..cbb14ae 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
 CONFIG_SYS_OR0_PRELIM=0xF8000F85
index 1deb8e0..120ac92 100644 (file)
@@ -48,6 +48,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
 CONFIG_SYS_OR0_PRELIM=0xF8000F85
index 212a29b..8f994ed 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
 CONFIG_SYS_BR0_PRELIM=0xE8001001
 CONFIG_SYS_OR0_PRELIM=0xF8000F85
index f8fcc1e..095c984 100644 (file)
@@ -44,6 +44,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index fd81751..759894f 100644 (file)
@@ -44,6 +44,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 29e7ec4..4c194e0 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 19660fb..737d2f5 100644 (file)
@@ -41,6 +41,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 174bc62..d9482ef 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index f14c6c8..a00ec4b 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 1657450..7f600c3 100644 (file)
@@ -40,6 +40,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 0e04aca..53e6f5e 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index cb3b534..8da4d0f 100644 (file)
@@ -44,6 +44,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index e4e5021..8656fee 100644 (file)
@@ -46,6 +46,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 9487802..c659997 100644 (file)
@@ -41,6 +41,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
 CONFIG_SYS_BR0_PRELIM_BOOL=y
index 29bfb31..8d1df5a 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 0650272..7835474 100644 (file)
@@ -65,6 +65,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index fd1da7f..0287eea 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index ae96942..ce7ef89 100644 (file)
@@ -51,6 +51,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_SYS_FSL_DDR3=y
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 8225e6e..80fac26 100644 (file)
@@ -58,6 +58,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_CHIP_SELECTS_PER_CTRL=2
 CONFIG_DDR_ECC=y
index d3b55ea..a2751ce 100644 (file)
@@ -56,6 +56,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_CHIP_SELECTS_PER_CTRL=2
 CONFIG_DDR_ECC=y
index 9474e20..0171fae 100644 (file)
@@ -59,6 +59,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_CHIP_SELECTS_PER_CTRL=2
 CONFIG_DDR_ECC=y
index 8128880..1462887 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="FM1@DTSEC4"
 CONFIG_DM=y
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=66666666
 CONFIG_CHIP_SELECTS_PER_CTRL=2
 CONFIG_DDR_ECC=y
index 6d4f282..23231d5 100644 (file)
@@ -64,6 +64,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DIMM_SLOTS_PER_CTLR=2
 CONFIG_DDR_ECC=y
index 07b8033..6839d8d 100644 (file)
@@ -62,6 +62,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DIMM_SLOTS_PER_CTLR=2
 CONFIG_DDR_ECC=y
index d68f166..9859cff 100644 (file)
@@ -65,6 +65,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DIMM_SLOTS_PER_CTLR=2
 CONFIG_DDR_ECC=y
index 11098cd..35b4896 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DIMM_SLOTS_PER_CTLR=2
 CONFIG_DDR_ECC=y
index a9461b8..7d745ae 100644 (file)
@@ -48,6 +48,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DYNAMIC_DDR_CLK_FREQ=y
 CONFIG_DIMM_SLOTS_PER_CTLR=2
 CONFIG_DDR_ECC=y
index fd6afa9..e130949 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 48f7e0c..2fb5aea 100644 (file)
@@ -64,6 +64,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index bb9d86c..f2d8d83 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 89af1e3..b50289e 100644 (file)
@@ -50,6 +50,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 71669d6..8a80023 100644 (file)
@@ -67,6 +67,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index f38943a..606e805 100644 (file)
@@ -65,6 +65,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index aaebb4f..e315492 100644 (file)
@@ -68,6 +68,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index f84163e..8818fc8 100644 (file)
@@ -51,6 +51,7 @@ CONFIG_ETHPRIME="FM1@DTSEC3"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133330000
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 06e4ae6..ee6f977 100644 (file)
@@ -56,6 +56,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133333333
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
index 2558551..2662fa2 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ETHPRIME="FM1@DTSEC1"
 CONFIG_DM=y
 CONFIG_SYS_SATA_MAX_DEVICE=2
 CONFIG_FSL_CAAM=y
+CONFIG_ARCH_MISC_INIT=y
 CONFIG_DDR_CLK_FREQ=133333333
 CONFIG_DDR_ECC=y
 CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y