[PATCH 01/13] common/Kconfig: Reword text for BOARD_TYPES

While it is true that for some Samsung platforms, we call get_board_type() the main usage of this CONFIG switch is to enable board_types in global data, which is then used by various platforms.
Signed-off-by: Tom Rini trini@konsulko.com --- common/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/common/Kconfig b/common/Kconfig index e3a5e1be1e95..86d6679d05b5 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -551,12 +551,11 @@ endmenu menu "Init options"
config BOARD_TYPES - bool "Call get_board_type() to get and display the board type" + bool "Enable board_type entry in global data struct" help - If this option is enabled, checkboard() will call get_board_type() - to get a string containing the board type and this will be - displayed immediately after the model is shown on the console - early in boot. + If this option is enabled, a field will be added to the global + data struct to store an unsigned long value for the type of + platform that we have determined we are on, at run-time.
config DISPLAY_CPUINFO bool "Display information about the CPU during start up"

We need to be calling arch_early_init_r() on 64bit mvebu platforms, so move this to a select.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd7fffcce0ba..724cbdde257c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -588,6 +588,7 @@ config ARCH_KIRKWOOD
config ARCH_MVEBU bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)" + select ARCH_EARLY_INIT_R if ARM64 select DM select DM_SERIAL select DM_SPI

On 2/16/23 04:36, Tom Rini wrote:
We need to be calling arch_early_init_r() on 64bit mvebu platforms, so move this to a select.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd7fffcce0ba..724cbdde257c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -588,6 +588,7 @@ config ARCH_KIRKWOOD
config ARCH_MVEBU bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
- select ARCH_EARLY_INIT_R if ARM64 select DM select DM_SERIAL select DM_SPI
Viele Grüße, Stefan Roese

On Wed, Feb 15, 2023 at 10:36:48PM -0500, Tom Rini wrote:
We need to be calling arch_early_init_r() on 64bit mvebu platforms, so move this to a select.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Stefan Roese sr@denx.de
Applied to u-boot/next, thanks!

The function arch_early_init_r only does anything on these platforms if we have FPGA (or SPL and SPL_FPGA) enabled, so move the logic to select based on that.
Cc: Michal Simek michal.simek@amd.com Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 724cbdde257c..c51f15fcf465 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1209,6 +1209,7 @@ config ARCH_VF610 config ARCH_ZYNQ bool "Xilinx Zynq based platform" select ARM_TWD_TIMER + select ARCH_EARLY_INIT_R if FPGA || (SPL && SPL_FPGA) select CLK select CLK_ZYNQ select CPU_V7A @@ -1230,7 +1231,6 @@ config ARCH_ZYNQ select SPL_TIMER if SPL select SUPPORT_SPL select TIMER - imply ARCH_EARLY_INIT_R imply BOARD_LATE_INIT imply CMD_CLK imply CMD_DM

On 2/16/23 04:36, Tom Rini wrote:
The function arch_early_init_r only does anything on these platforms if we have FPGA (or SPL and SPL_FPGA) enabled, so move the logic to select based on that.
Cc: Michal Simek michal.simek@amd.com Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 724cbdde257c..c51f15fcf465 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1209,6 +1209,7 @@ config ARCH_VF610 config ARCH_ZYNQ bool "Xilinx Zynq based platform" select ARM_TWD_TIMER
- select ARCH_EARLY_INIT_R if FPGA || (SPL && SPL_FPGA) select CLK select CLK_ZYNQ select CPU_V7A
@@ -1230,7 +1231,6 @@ config ARCH_ZYNQ select SPL_TIMER if SPL select SUPPORT_SPL select TIMER
- imply ARCH_EARLY_INIT_R imply BOARD_LATE_INIT imply CMD_CLK imply CMD_DM
Reviewed-by: Michal Simek michal.simek@amd.com
Thanks, Michal

On Thu, 16 Feb 2023 at 02:54, Michal Simek michal.simek@amd.com wrote:
On 2/16/23 04:36, Tom Rini wrote:
The function arch_early_init_r only does anything on these platforms if we have FPGA (or SPL and SPL_FPGA) enabled, so move the logic to select based on that.
Cc: Michal Simek michal.simek@amd.com Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Feb 15, 2023 at 10:36:49PM -0500, Tom Rini wrote:
The function arch_early_init_r only does anything on these platforms if we have FPGA (or SPL and SPL_FPGA) enabled, so move the logic to select based on that.
Cc: Michal Simek michal.simek@amd.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Michal Simek michal.simek@amd.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/next, thanks!

On the lion and evb-px5 platforms, we need this function, so select it.
Cc: Andy Yan andy.yan@rock-chips.com Cc: Quentin Schulz quentin.schulz@theobroma-systems.com Cc: Klaus Goger klaus.goger@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-rockchip/rk3368/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3368/Kconfig b/arch/arm/mach-rockchip/rk3368/Kconfig index c3249a7be457..3de695186ed9 100644 --- a/arch/arm/mach-rockchip/rk3368/Kconfig +++ b/arch/arm/mach-rockchip/rk3368/Kconfig @@ -5,6 +5,7 @@ choice
config TARGET_LION_RK3368 bool "Theobroma Systems RK3368-uQ7 (Lion) module" + select ARCH_EARLY_INIT_R help The RK3368-uQ7 is a micro-Qseven form-factor (40mm x 70mm, MXM-230 connector) system-on-module designed by Theobroma @@ -34,6 +35,7 @@ config TARGET_GEEKBOX
config TARGET_EVB_PX5 bool "Evb-PX5" + select ARCH_EARLY_INIT_R help PX5 EVB is designed by Rockchip for automotive field with integrated CVBS (TP2825) / MIPI DSI / CSI / LVDS

On Wed, 15 Feb 2023 at 20:38, Tom Rini trini@konsulko.com wrote:
On the lion and evb-px5 platforms, we need this function, so select it.
Cc: Andy Yan andy.yan@rock-chips.com Cc: Quentin Schulz quentin.schulz@theobroma-systems.com Cc: Klaus Goger klaus.goger@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/mach-rockchip/rk3368/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3368/Kconfig b/arch/arm/mach-rockchip/rk3368/Kconfig index c3249a7be457..3de695186ed9 100644 --- a/arch/arm/mach-rockchip/rk3368/Kconfig +++ b/arch/arm/mach-rockchip/rk3368/Kconfig @@ -5,6 +5,7 @@ choice
Reviewed-by: Simon Glass sjg@chromium.org

Hi Tom,
On 2/16/23 04:36, Tom Rini wrote:
On the lion and evb-px5 platforms, we need this function, so select it.
Cc: Andy Yan andy.yan@rock-chips.com Cc: Quentin Schulz quentin.schulz@theobroma-systems.com
Reviewed-by: Quentin Schulz quentin.schulz@theobroma-systems.com
Thanks, Quentin

On Wed, Feb 15, 2023 at 10:36:50PM -0500, Tom Rini wrote:
On the lion and evb-px5 platforms, we need this function, so select it.
Cc: Andy Yan andy.yan@rock-chips.com Cc: Quentin Schulz quentin.schulz@theobroma-systems.com Cc: Klaus Goger klaus.goger@theobroma-systems.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Quentin Schulz quentin.schulz@theobroma-systems.com
Applied to u-boot/next, thanks!

As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text.
Signed-off-by: Tom Rini trini@konsulko.com --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig index 86d6679d05b5..e35fca69823d 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -633,7 +633,7 @@ config EVENT_DEBUG endif # EVENT
config ARCH_EARLY_INIT_R - bool "Call arch-specific init soon after relocation" + bool help With this option U-Boot will call arch_early_init_r() soon after relocation. Driver model is running by this point, and the cache

On Wed, 15 Feb 2023 at 20:38, Tom Rini trini@konsulko.com wrote:
As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text.
Signed-off-by: Tom Rini trini@konsulko.com
common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Feb 15, 2023 at 10:36:51PM -0500, Tom Rini wrote:
As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/next, thanks!

We don't need an empty function, we can just not enable the hook we don't use.
Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-imx/imx9/soc.c | 5 ----- configs/imx93_11x11_evk_defconfig | 1 - 2 files changed, 6 deletions(-)
diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 797d7a802baf..a16e22ea6bbf 100644 --- a/arch/arm/mach-imx/imx9/soc.c +++ b/arch/arm/mach-imx/imx9/soc.c @@ -208,11 +208,6 @@ int print_cpuinfo(void) return 0; }
-int arch_misc_init(void) -{ - return 0; -} - int ft_system_setup(void *blob, struct bd_info *bd) { return 0; diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index 64da123c3723..33d703020798 100644 --- a/configs/imx93_11x11_evk_defconfig +++ b/configs/imx93_11x11_evk_defconfig @@ -25,7 +25,6 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_REMAKE_ELF=y CONFIG_SYS_MONITOR_LEN=524288 CONFIG_DEFAULT_FDT_FILE="imx93-11x11-evk.dtb" -CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x26000

On Wed, 15 Feb 2023 at 20:38, Tom Rini trini@konsulko.com wrote:
We don't need an empty function, we can just not enable the hook we don't use.
Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/mach-imx/imx9/soc.c | 5 ----- configs/imx93_11x11_evk_defconfig | 1 - 2 files changed, 6 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 2/16/2023 11:36 AM, Tom Rini wrote:
We don't need an empty function, we can just not enable the hook we don't use.
Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Peng Fan peng.fan@nxp.com
arch/arm/mach-imx/imx9/soc.c | 5 ----- configs/imx93_11x11_evk_defconfig | 1 - 2 files changed, 6 deletions(-)
diff --git a/arch/arm/mach-imx/imx9/soc.c b/arch/arm/mach-imx/imx9/soc.c index 797d7a802baf..a16e22ea6bbf 100644 --- a/arch/arm/mach-imx/imx9/soc.c +++ b/arch/arm/mach-imx/imx9/soc.c @@ -208,11 +208,6 @@ int print_cpuinfo(void) return 0; }
-int arch_misc_init(void) -{
- return 0;
-}
- int ft_system_setup(void *blob, struct bd_info *bd) { return 0;
diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig index 64da123c3723..33d703020798 100644 --- a/configs/imx93_11x11_evk_defconfig +++ b/configs/imx93_11x11_evk_defconfig @@ -25,7 +25,6 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_REMAKE_ELF=y CONFIG_SYS_MONITOR_LEN=524288 CONFIG_DEFAULT_FDT_FILE="imx93-11x11-evk.dtb" -CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x26000

On Wed, Feb 15, 2023 at 10:36:52PM -0500, Tom Rini wrote:
We don't need an empty function, we can just not enable the hook we don't use.
Cc: Peng Fan peng.fan@nxp.com Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Peng Fan peng.fan@nxp.com
Applied to u-boot/next, thanks!

In this platform, arch_misc_init doesn't perform any real function. The call to get_soc_type_rev has no lasting side effects.
Cc: Chris Packham chris.packham@alliedtelesis.co.nz Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-mvebu/alleycat5/soc.c | 9 --------- configs/mvebu_ac5_rd_defconfig | 1 - 2 files changed, 10 deletions(-)
diff --git a/arch/arm/mach-mvebu/alleycat5/soc.c b/arch/arm/mach-mvebu/alleycat5/soc.c index efbef233a148..dc69f46eedb2 100644 --- a/arch/arm/mach-mvebu/alleycat5/soc.c +++ b/arch/arm/mach-mvebu/alleycat5/soc.c @@ -287,12 +287,3 @@ int mach_cpu_init(void)
return 0; } - -int arch_misc_init(void) -{ - u32 type, rev; - - get_soc_type_rev(&type, &rev); - - return 0; -} diff --git a/configs/mvebu_ac5_rd_defconfig b/configs/mvebu_ac5_rd_defconfig index a27202eb23e2..4e66791dbda8 100644 --- a/configs/mvebu_ac5_rd_defconfig +++ b/configs/mvebu_ac5_rd_defconfig @@ -22,7 +22,6 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_ARCH_EARLY_INIT_R=y -CONFIG_ARCH_MISC_INIT=y CONFIG_CMD_BOOTZ=y CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10 CONFIG_CMD_MEMTEST=y

On Wed, 15 Feb 2023 at 20:38, Tom Rini trini@konsulko.com wrote:
In this platform, arch_misc_init doesn't perform any real function. The call to get_soc_type_rev has no lasting side effects.
Cc: Chris Packham chris.packham@alliedtelesis.co.nz Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/mach-mvebu/alleycat5/soc.c | 9 --------- configs/mvebu_ac5_rd_defconfig | 1 - 2 files changed, 10 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On 16/02/23 16:36, Tom Rini wrote:
In this platform, arch_misc_init doesn't perform any real function. The call to get_soc_type_rev has no lasting side effects.
Cc: Chris Packham chris.packham@alliedtelesis.co.nz Signed-off-by: Tom Rini trini@konsulko.com\
A hangover from the Marvell code I started with. They've replaced it with an empty arch_misc_init() in their newer u-boot code but not selecting CONFIG_ARCH_MISC_INIT is a much better approach.
Reviewed-by: Chris Packham chris.packham@alliedtelesis.co.nz
arch/arm/mach-mvebu/alleycat5/soc.c | 9 --------- configs/mvebu_ac5_rd_defconfig | 1 - 2 files changed, 10 deletions(-)
diff --git a/arch/arm/mach-mvebu/alleycat5/soc.c b/arch/arm/mach-mvebu/alleycat5/soc.c index efbef233a148..dc69f46eedb2 100644 --- a/arch/arm/mach-mvebu/alleycat5/soc.c +++ b/arch/arm/mach-mvebu/alleycat5/soc.c @@ -287,12 +287,3 @@ int mach_cpu_init(void)
return 0; }
-int arch_misc_init(void) -{
- u32 type, rev;
- get_soc_type_rev(&type, &rev);
- return 0;
-} diff --git a/configs/mvebu_ac5_rd_defconfig b/configs/mvebu_ac5_rd_defconfig index a27202eb23e2..4e66791dbda8 100644 --- a/configs/mvebu_ac5_rd_defconfig +++ b/configs/mvebu_ac5_rd_defconfig @@ -22,7 +22,6 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_ARCH_EARLY_INIT_R=y -CONFIG_ARCH_MISC_INIT=y CONFIG_CMD_BOOTZ=y CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10 CONFIG_CMD_MEMTEST=y

On Wed, Feb 15, 2023 at 10:36:53PM -0500, Tom Rini wrote:
In this platform, arch_misc_init doesn't perform any real function. The call to get_soc_type_rev has no lasting side effects.
Cc: Chris Packham chris.packham@alliedtelesis.co.nz Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Chris Packham chris.packham@alliedtelesis.co.nz
Applied to u-boot/next, thanks!

If this hooks is needed later, it should be added and populated for real.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/mach-mvebu/Kconfig | 1 - arch/arm/mach-mvebu/cpu.c | 11 ----------- 2 files changed, 12 deletions(-)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 16c5e7229550..6a8bf39f86b1 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -5,7 +5,6 @@ config HAVE_MVEBU_EFUSE
config ARMADA_32BIT bool - select ARCH_MISC_INIT select BOARD_EARLY_INIT_F select CPU_V7A select SPL_DM if SPL diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 329d13691f0e..1d14e2eca596 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -514,17 +514,6 @@ u32 mvebu_get_nand_clock(void) NAND_ECC_DIVCKL_RATIO_MASK) >> NAND_ECC_DIVCKL_RATIO_OFFS); }
-/* - * SOC specific misc init - */ -#if defined(CONFIG_ARCH_MISC_INIT) -int arch_misc_init(void) -{ - /* Nothing yet, perhaps we need something here later */ - return 0; -} -#endif /* CONFIG_ARCH_MISC_INIT */ - #if defined(CONFIG_MMC_SDHCI_MV) && !defined(CONFIG_DM_MMC) int board_mmc_init(struct bd_info *bis) {

On 2/16/23 04:36, Tom Rini wrote:
If this hooks is needed later, it should be added and populated for real.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com
Reviewed-by: Stefan Roese sr@denx.de
Thanks, Stefan
arch/arm/mach-mvebu/Kconfig | 1 - arch/arm/mach-mvebu/cpu.c | 11 ----------- 2 files changed, 12 deletions(-)
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 16c5e7229550..6a8bf39f86b1 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -5,7 +5,6 @@ config HAVE_MVEBU_EFUSE
config ARMADA_32BIT bool
- select ARCH_MISC_INIT select BOARD_EARLY_INIT_F select CPU_V7A select SPL_DM if SPL
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 329d13691f0e..1d14e2eca596 100644 --- a/arch/arm/mach-mvebu/cpu.c +++ b/arch/arm/mach-mvebu/cpu.c @@ -514,17 +514,6 @@ u32 mvebu_get_nand_clock(void) NAND_ECC_DIVCKL_RATIO_MASK) >> NAND_ECC_DIVCKL_RATIO_OFFS); }
-/*
- SOC specific misc init
- */
-#if defined(CONFIG_ARCH_MISC_INIT) -int arch_misc_init(void) -{
- /* Nothing yet, perhaps we need something here later */
- return 0;
-} -#endif /* CONFIG_ARCH_MISC_INIT */
- #if defined(CONFIG_MMC_SDHCI_MV) && !defined(CONFIG_DM_MMC) int board_mmc_init(struct bd_info *bis) {
Viele Grüße, Stefan Roese

On Wed, Feb 15, 2023 at 10:36:54PM -0500, Tom Rini wrote:
If this hooks is needed later, it should be added and populated for real.
Cc: Stefan Roese sr@denx.de Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Stefan Roese sr@denx.de
Applied to u-boot/next, thanks!

We don't need to provide an empty arch_misc_init function here, we can just not enable the hook.
Cc: Stefan Bosch stefan_b@posteo.net Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/cpu/armv7/s5p4418/cpu.c | 7 ------- configs/s5p4418_nanopi2_defconfig | 1 - 2 files changed, 8 deletions(-)
diff --git a/arch/arm/cpu/armv7/s5p4418/cpu.c b/arch/arm/cpu/armv7/s5p4418/cpu.c index fcaafc0ff76f..8febfe527669 100644 --- a/arch/arm/cpu/armv7/s5p4418/cpu.c +++ b/arch/arm/cpu/armv7/s5p4418/cpu.c @@ -84,10 +84,3 @@ void enable_caches(void) /* Enable D-cache. I-cache is already enabled in start.S */ dcache_enable(); } - -#if defined(CONFIG_ARCH_MISC_INIT) -int arch_misc_init(void) -{ - return 0; -} -#endif /* CONFIG_ARCH_MISC_INIT */ diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig index 0645b09f78a4..a6154e137287 100644 --- a/configs/s5p4418_nanopi2_defconfig +++ b/configs/s5p4418_nanopi2_defconfig @@ -29,7 +29,6 @@ CONFIG_FIT_BEST_MATCH=y CONFIG_SUPPORT_RAW_INITRD=y CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTDELAY=1 -CONFIG_ARCH_MISC_INIT=y CONFIG_BOARD_LATE_INIT=y CONFIG_HUSH_PARSER=y CONFIG_SYS_PBSIZE=1050

On Wed, 15 Feb 2023 at 20:39, Tom Rini trini@konsulko.com wrote:
We don't need to provide an empty arch_misc_init function here, we can just not enable the hook.
Cc: Stefan Bosch stefan_b@posteo.net Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/cpu/armv7/s5p4418/cpu.c | 7 ------- configs/s5p4418_nanopi2_defconfig | 1 - 2 files changed, 8 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Fri, 17 Feb 2023 at 05:19, Simon Glass sjg@chromium.org wrote:
On Wed, 15 Feb 2023 at 20:39, Tom Rini trini@konsulko.com wrote:
We don't need to provide an empty arch_misc_init function here, we can just not enable the hook.
Cc: Stefan Bosch stefan_b@posteo.net Signed-off-by: Tom Rini trini@konsulko.com
arch/arm/cpu/armv7/s5p4418/cpu.c | 7 ------- configs/s5p4418_nanopi2_defconfig | 1 - 2 files changed, 8 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Reviewed-by: Minkyu Kang mk7.kang@samsung.com

On Wed, Feb 15, 2023 at 10:36:55PM -0500, Tom Rini wrote:
We don't need to provide an empty arch_misc_init function here, we can just not enable the hook.
Cc: Stefan Bosch stefan_b@posteo.net Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org Reviewed-by: Minkyu Kang mk7.kang@samsung.com
Applied to u-boot/next, thanks!

On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com --- board/toradex/verdin-imx8mm/spl.c | 5 ----- configs/verdin-imx8mm_defconfig | 1 - 2 files changed, 6 deletions(-)
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 9d54d60bb17d..3f33ff7d87a4 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -51,11 +51,6 @@ void spl_dram_init(void) ddr_init(&dram_timing); }
-void spl_board_init(void) -{ - arch_misc_init(); -} - #ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index 5b5f7c051e54..0e7d67cf093d 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -40,7 +40,6 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000 -CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_STACK=0x920000 CONFIG_SYS_SPL_MALLOC=y

On Wed, 2023-02-15 at 22:36 -0500, Tom Rini wrote:
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
board/toradex/verdin-imx8mm/spl.c | 5 ----- configs/verdin-imx8mm_defconfig | 1 - 2 files changed, 6 deletions(-)
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 9d54d60bb17d..3f33ff7d87a4 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -51,11 +51,6 @@ void spl_dram_init(void) ddr_init(&dram_timing); } -void spl_board_init(void) -{ - arch_misc_init(); -}
#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index 5b5f7c051e54..0e7d67cf093d 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -40,7 +40,6 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000 -CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_STACK=0x920000 CONFIG_SYS_SPL_MALLOC=y

Hi Tom
On Thu, 2023-02-16 at 13:37 +0100, Marcel Ziswiler wrote:
On Wed, 2023-02-15 at 22:36 -0500, Tom Rini wrote:
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Sorry, I have to take my ack back. Marek (and Francesco) are, of course, right and this is indeed needed for CAAM. Please see also [1] where it got changed/introduced in/to the current form.
[1] https://lore.kernel.org/all/20220919194118.105820-1-marex@denx.de/
Cheers
Marcel
board/toradex/verdin-imx8mm/spl.c | 5 ----- configs/verdin-imx8mm_defconfig | 1 - 2 files changed, 6 deletions(-)
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 9d54d60bb17d..3f33ff7d87a4 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -51,11 +51,6 @@ void spl_dram_init(void) ddr_init(&dram_timing); } -void spl_board_init(void) -{ - arch_misc_init(); -}
#ifdef CONFIG_SPL_LOAD_FIT int board_fit_config_name_match(const char *name) { diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index 5b5f7c051e54..0e7d67cf093d 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -40,7 +40,6 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000 -CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_STACK=0x920000 CONFIG_SYS_SPL_MALLOC=y

On Fri, Feb 17, 2023 at 01:18:34PM +0000, Marcel Ziswiler wrote:
Hi Tom
On Thu, 2023-02-16 at 13:37 +0100, Marcel Ziswiler wrote:
On Wed, 2023-02-15 at 22:36 -0500, Tom Rini wrote:
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Sorry, I have to take my ack back. Marek (and Francesco) are, of course, right and this is indeed needed for CAAM. Please see also [1] where it got changed/introduced in/to the current form.
[1] https://lore.kernel.org/all/20220919194118.105820-1-marex@denx.de/
Alright, yeah. I've posted v2 which preserves the existing behavior, but it could be improved further still by someone with the hardware to confirm behavior on.

On Fri, Feb 17, 2023 at 09:03:07AM -0500, Tom Rini wrote:
On Fri, Feb 17, 2023 at 01:18:34PM +0000, Marcel Ziswiler wrote:
Hi Tom
On Thu, 2023-02-16 at 13:37 +0100, Marcel Ziswiler wrote:
On Wed, 2023-02-15 at 22:36 -0500, Tom Rini wrote:
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Sorry, I have to take my ack back. Marek (and Francesco) are, of course, right and this is indeed needed for CAAM. Please see also [1] where it got changed/introduced in/to the current form.
[1] https://lore.kernel.org/all/20220919194118.105820-1-marex@denx.de/
Alright, yeah. I've posted v2 which preserves the existing behavior, but it could be improved further still by someone with the hardware to confirm behavior on.
[PATCHv2 12/13] global: Add a select for ARCH_MISC_INIT where used -- ?
I would say that even with that patch in, this specific one should be dropped.
At least this is what I understand from your comment here:
Yes, it's still on the board to call arch_misc_init() inside spl_board_init().
We can test your changes on the Verdin iMX8MM, even Marek should have one to my understanding, in case we are somehow late.
Thanks, Francesco

On Fri, Feb 17, 2023 at 05:14:11PM +0100, Francesco Dolcini wrote:
On Fri, Feb 17, 2023 at 09:03:07AM -0500, Tom Rini wrote:
On Fri, Feb 17, 2023 at 01:18:34PM +0000, Marcel Ziswiler wrote:
Hi Tom
On Thu, 2023-02-16 at 13:37 +0100, Marcel Ziswiler wrote:
On Wed, 2023-02-15 at 22:36 -0500, Tom Rini wrote:
On this platform SPL_BOARD_INIT is used to call arch_misc_init which is in turn empty, drop the call.
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Signed-off-by: Tom Rini trini@konsulko.com
Acked-by: Marcel Ziswiler marcel.ziswiler@toradex.com
Sorry, I have to take my ack back. Marek (and Francesco) are, of course, right and this is indeed needed for CAAM. Please see also [1] where it got changed/introduced in/to the current form.
[1] https://lore.kernel.org/all/20220919194118.105820-1-marex@denx.de/
Alright, yeah. I've posted v2 which preserves the existing behavior, but it could be improved further still by someone with the hardware to confirm behavior on.
[PATCHv2 12/13] global: Add a select for ARCH_MISC_INIT where used -- ?
I would say that even with that patch in, this specific one should be dropped.
Yes, with v2 of 12/13, patches 10 and 11 from v1 of the series are dropped, to be clear.
At least this is what I understand from your comment here:
Yes, it's still on the board to call arch_misc_init() inside spl_board_init().
We can test your changes on the Verdin iMX8MM, even Marek should have one to my understanding, in case we are somehow late.
What I mean is that Marek has suggested a more specific fix to this problem (it should not be per-board to get the CAAM working for HAB here, it should be in the SoC code and hooks), and I would quite welcome the general clean-up but can't test it, so won't write it, right now.

On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Signed-off-by: Tom Rini trini@konsulko.com --- configs/imx8mm-mx8menlo_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/imx8mm-mx8menlo_defconfig b/configs/imx8mm-mx8menlo_defconfig index f1e48bba9653..7ca327676171 100644 --- a/configs/imx8mm-mx8menlo_defconfig +++ b/configs/imx8mm-mx8menlo_defconfig @@ -40,7 +40,6 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x910000 CONFIG_SPL_BSS_MAX_SIZE=0x2000 -CONFIG_SPL_BOARD_INIT=y # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set CONFIG_SPL_STACK=0x920000 CONFIG_SYS_SPL_MALLOC=y

On 2/16/23 04:36, Tom Rini wrote:
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com
btw. put those under --- next time, that way they don't end up in commit message.
Signed-off-by: Tom Rini trini@konsulko.com
If CAAM is enabled, ARCH_MISC_INIT brings up the CAAM , and this is needed in SPL for U-Boot authentication using HABv4 . I believe that is why Verdin spl.c calls it.

On Thu, Feb 16, 2023 at 03:04:35PM +0100, Marek Vasut wrote:
On 2/16/23 04:36, Tom Rini wrote:
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com
btw. put those under --- next time, that way they don't end up in commit message.
Er, did the kernel change expected behavior here?
Signed-off-by: Tom Rini trini@konsulko.com
If CAAM is enabled, ARCH_MISC_INIT brings up the CAAM , and this is needed in SPL for U-Boot authentication using HABv4 . I believe that is why Verdin spl.c calls it.
Then I'll put doing a follow-up on SPL_BOARD_INIT (which is another option that shouldn't be directly asked, but select'd when used) for that case. It fails to build in this series because CAAM isn't enabled so there's no arch_misc_init.

On 2/16/23 15:13, Tom Rini wrote:
On Thu, Feb 16, 2023 at 03:04:35PM +0100, Marek Vasut wrote:
On 2/16/23 04:36, Tom Rini wrote:
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com
btw. put those under --- next time, that way they don't end up in commit message.
Er, did the kernel change expected behavior here?
Er ... wasn't that the case for like a year now ?
Signed-off-by: Tom Rini trini@konsulko.com
If CAAM is enabled, ARCH_MISC_INIT brings up the CAAM , and this is needed in SPL for U-Boot authentication using HABv4 . I believe that is why Verdin spl.c calls it.
Then I'll put doing a follow-up on SPL_BOARD_INIT (which is another option that shouldn't be directly asked, but select'd when used) for that case. It fails to build in this series because CAAM isn't enabled so there's no arch_misc_init.
Just call the arch_board_init unconditionally, the CAAM inside of it is already conditional, so the compiler should inline the result if CAAM is disabled.

On Thu, Feb 16, 2023 at 03:21:43PM +0100, Marek Vasut wrote:
On 2/16/23 15:13, Tom Rini wrote:
On Thu, Feb 16, 2023 at 03:04:35PM +0100, Marek Vasut wrote:
On 2/16/23 04:36, Tom Rini wrote:
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com
btw. put those under --- next time, that way they don't end up in commit message.
Er, did the kernel change expected behavior here?
Er ... wasn't that the case for like a year now ?
Is that a yes then?
Signed-off-by: Tom Rini trini@konsulko.com
If CAAM is enabled, ARCH_MISC_INIT brings up the CAAM , and this is needed in SPL for U-Boot authentication using HABv4 . I believe that is why Verdin spl.c calls it.
Then I'll put doing a follow-up on SPL_BOARD_INIT (which is another option that shouldn't be directly asked, but select'd when used) for that case. It fails to build in this series because CAAM isn't enabled so there's no arch_misc_init.
Just call the arch_board_init unconditionally, the CAAM inside of it is already conditional, so the compiler should inline the result if CAAM is disabled.
It doesn't, and only maybe does with LTO. But we also shouldn't be enabling unused hooks. It sounds like imx8m should follow the other platforms that have an spl_board_init under arch/ ?

On 2/16/23 15:41, Tom Rini wrote:
On Thu, Feb 16, 2023 at 03:21:43PM +0100, Marek Vasut wrote:
On 2/16/23 15:13, Tom Rini wrote:
On Thu, Feb 16, 2023 at 03:04:35PM +0100, Marek Vasut wrote:
On 2/16/23 04:36, Tom Rini wrote:
On this platform spl_board_init is a call to arch_misc_init which is a no-op, so drop the CONFIG options.
Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com
btw. put those under --- next time, that way they don't end up in commit message.
Er, did the kernel change expected behavior here?
Er ... wasn't that the case for like a year now ?
Is that a yes then?
I got repeated flak for sticking a wall of Cc: into the commit message recently, so I guess that's a yes .
Signed-off-by: Tom Rini trini@konsulko.com
If CAAM is enabled, ARCH_MISC_INIT brings up the CAAM , and this is needed in SPL for U-Boot authentication using HABv4 . I believe that is why Verdin spl.c calls it.
Then I'll put doing a follow-up on SPL_BOARD_INIT (which is another option that shouldn't be directly asked, but select'd when used) for that case. It fails to build in this series because CAAM isn't enabled so there's no arch_misc_init.
Just call the arch_board_init unconditionally, the CAAM inside of it is already conditional, so the compiler should inline the result if CAAM is disabled.
It doesn't, and only maybe does with LTO. But we also shouldn't be enabling unused hooks. It sounds like imx8m should follow the other platforms that have an spl_board_init under arch/ ?
spl_BOARD_init shouldn't be in arch in the first place, but I think what needs to be done here in the long run is, set DM_FLAG_PROBE_AFTER_BIND on CAAM in SPL if CAAM is enabled. That can be done somewhere in arch/arm/mach-imx/imx8m early boot code. And then let DM bring the CAAM up. I think that's the way to go with cleaning up the CAAM and spl_board_init part, without breaking support for HABv4.

When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com Signed-off-by: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 7 +++++++ arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/mach-imx/imx8/Kconfig | 2 -- arch/arm/mach-imx/imx8m/Kconfig | 6 ------ arch/arm/mach-imx/mx6/Kconfig | 5 ----- arch/arm/mach-imx/mx7ulp/Kconfig | 1 - arch/arm/mach-imx/mxs/Kconfig | 3 +++ arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-tegra/tegra124/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra30/Kconfig | 2 ++ arch/mips/Kconfig | 1 + arch/powerpc/Kconfig | 1 + 14 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c51f15fcf465..ef3910b367b5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -605,6 +605,7 @@ config ARCH_MVEBU
config ARCH_ORION5X bool "Marvell Orion" + select ARCH_MISC_INIT select CPU_ARM926EJS select GPIO_EXTRA_HEADER select SPL_SEPARATE_BSS if SPL @@ -819,6 +820,7 @@ config ARCH_LPC32XX config ARCH_IMX8 bool "NXP i.MX8 platform" select ARM64 + select ARCH_MISC_INIT if FSL_CAAM select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_4 select SYS_FSL_SEC_LE @@ -832,6 +834,7 @@ config ARCH_IMX8 config ARCH_IMX8M bool "NXP i.MX8M platform" select ARM64 + select ARCH_MISC_INIT if FSL_CAAM select GPIO_EXTRA_HEADER select MACH_IMX select SYS_FSL_HAS_SEC @@ -902,6 +905,7 @@ config ARCH_MX31
config ARCH_MX7ULP bool "NXP MX7ULP" + select ARCH_MISC_INIT if FSL_CAAM select BOARD_POSTCLK_INIT select CPU_V7A select GPIO_EXTRA_HEADER @@ -929,6 +933,7 @@ config ARCH_MX7
config ARCH_MX6 bool "Freescale MX6" + select ARCH_MISC_INIT select BOARD_POSTCLK_INIT select CPU_V7A select GPIO_EXTRA_HEADER @@ -1023,6 +1028,7 @@ config ARCH_QEMU
config ARCH_RMOBILE bool "Renesas ARM SoCs" + select ARCH_MISC_INIT if !RZA1 select DM select DM_SERIAL select GPIO_EXTRA_HEADER @@ -1198,6 +1204,7 @@ config ARCH_VERSAL_NET
config ARCH_VF610 bool "Freescale Vybrid" + select ARCH_MISC_INIT select CPU_V7A select GPIO_EXTRA_HEADER select IOMUX_SHARE_CONF_REG diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig index 3e292bf70e18..4546025195b9 100644 --- a/arch/arm/cpu/armv7/ls102xa/Kconfig +++ b/arch/arm/cpu/armv7/ls102xa/Kconfig @@ -1,5 +1,6 @@ config ARCH_LS1021A bool + select ARCH_MISC_INIT if FSL_CAAM select FSL_DEVICE_DISABLE select FSL_IFC if !QSPI_BOOT && !SD_BOOT_QSPI select LS102XA_STREAM_ID diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index a8b493e2f875..a42ede24f189 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -328,6 +328,7 @@ config ARCH_LX2160A
config FSL_LSCH2 bool + select ARCH_MISC_INIT if FSL_CAAM select SKIP_LOWLEVEL_INIT select SYS_FSL_CCSR_GUR_BE select SYS_FSL_CCSR_SCFG_BE diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d189586..c211a1bb687e 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -75,7 +75,6 @@ config TARGET_IMX8QM_MEK select BOARD_LATE_INIT select IMX8QM select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_CONGA_QMX8 @@ -98,7 +97,6 @@ config TARGET_IMX8QXP_MEK select BOARD_LATE_INIT select IMX8QXP select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
endchoice diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 5e4836b02feb..d6845c053718 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -51,7 +51,6 @@ config TARGET_IMX8MQ_EVK select IMX8MQ select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MQ_PHANBELL @@ -74,7 +73,6 @@ config TARGET_IMX8MM_EVK select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MM_ICORE_MX8MM @@ -126,7 +124,6 @@ config TARGET_KONTRON_MX8MM select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MN_BSH_SMM_S2 @@ -198,7 +195,6 @@ config TARGET_IMX8MP_EVK select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MP_VENICE @@ -250,7 +246,6 @@ config TARGET_IMX8MM_BEACON select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MN_BEACON @@ -260,7 +255,6 @@ config TARGET_IMX8MN_BEACON select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_PHYCORE_IMX8MM diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 7529b311f80e..5df41da8771b 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -364,7 +364,6 @@ config TARGET_MX6SABREAUTO select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SABRESD bool "mx6sabresd" @@ -376,7 +375,6 @@ config TARGET_MX6SABRESD select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SLEVK bool "mx6slevk" @@ -401,7 +399,6 @@ config TARGET_MX6SXSABRESD select DM_THERMAL select SUPPORT_SPL select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SXSABREAUTO bool "mx6sxsabreauto" @@ -421,7 +418,6 @@ config TARGET_MX6UL_9X9_EVK select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6UL_14X14_EVK bool "mx6ul_14x14_evk" @@ -432,7 +428,6 @@ config TARGET_MX6UL_14X14_EVK select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6UL_ENGICAM bool "Support Engicam GEAM6UL/Is.IoT" diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig index 632c4bf6fa5e..e238e977a71a 100644 --- a/arch/arm/mach-imx/mx7ulp/Kconfig +++ b/arch/arm/mach-imx/mx7ulp/Kconfig @@ -41,7 +41,6 @@ config TARGET_MX7ULP_EVK select MX7ULP select SYS_ARCH_TIMER select FSL_CAAM - select ARCH_MISC_INIT
endchoice
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig index b2026a3758a5..797eaf83bda8 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -10,10 +10,12 @@ choice
config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_MX23EVK bool "Support mx23evk" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_XFI3 @@ -41,6 +43,7 @@ choice
config TARGET_MX28EVK bool "Support mx28evk" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_XEA diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 309b967b0dd5..e874060d283c 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -113,6 +113,7 @@ config AM43XX config AM33XX bool "AM33XX SoC" select ARM_CORTEX_A8_CVE_2017_5715 + select ARCH_MISC_INIT if USB select DM_EVENT select SPECIFY_CONSOLE_INDEX imply NAND_OMAP_ELM diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig index fb016aa46c90..b3f25fc0827d 100644 --- a/arch/arm/mach-tegra/tegra124/Kconfig +++ b/arch/arm/mach-tegra/tegra124/Kconfig @@ -6,6 +6,7 @@ choice
config TARGET_APALIS_TK1 bool "Toradex Apalis TK1 module" + select ARCH_MISC_INIT select ARCH_SUPPORT_PSCI select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig index 955786c0c484..142290e97389 100644 --- a/arch/arm/mach-tegra/tegra20/Kconfig +++ b/arch/arm/mach-tegra/tegra20/Kconfig @@ -57,6 +57,7 @@ config TARGET_VENTANA
config TARGET_COLIBRI_T20 bool "Toradex Colibri T20 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT select TEGRA_UARTA_SDIO1
diff --git a/arch/arm/mach-tegra/tegra30/Kconfig b/arch/arm/mach-tegra/tegra30/Kconfig index 5619d1cd42f7..8f6f24a7a7ca 100644 --- a/arch/arm/mach-tegra/tegra30/Kconfig +++ b/arch/arm/mach-tegra/tegra30/Kconfig @@ -12,6 +12,7 @@ choice
config TARGET_APALIS_T30 bool "Toradex Apalis T30 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT
config TARGET_BEAVER @@ -26,6 +27,7 @@ config TARGET_CARDHU
config TARGET_COLIBRI_T30 bool "Toradex Colibri T30 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT
config TARGET_TEC_NG diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 569f5f48bc6c..536b6ad64aa9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -98,6 +98,7 @@ config ARCH_JZ47XX config ARCH_OCTEON bool "Support Marvell Octeon CN7xxx platforms" select ARCH_EARLY_INIT_R + select ARCH_MISC_INIT select CPU_CAVIUM_OCTEON select DISPLAY_CPUINFO select DMA_ADDR_T_64BIT diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index bee59c3bea4f..93bc1a4b6b3f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -17,6 +17,7 @@ config MPC83xx
config MPC85xx bool "MPC85xx" + select ARCH_MISC_INIT if FSL_CAAM && !(ARCH_P1010 || TARGET_KMCENT2) select CREATE_ARCH_SYMLINK select SYS_FSL_DDR select SYS_FSL_DDR_BE

When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Signed-off-by: Tom Rini trini@konsulko.com --- Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com
Changes in v2: - Always select ARCH_MISC_INIT on IMX8M as dealing with FSL_CAAM or not needs further SoC-specific clean up work. This replaces patches 10 and 11 from before so that if the user enables FSL_CAAM then they will continue to get the functionality they had before. As Marek noted in the thread, further clean-up in this area would be good.
--- arch/arm/Kconfig | 7 +++++++ arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 1 + arch/arm/mach-imx/imx8/Kconfig | 2 -- arch/arm/mach-imx/imx8m/Kconfig | 6 ------ arch/arm/mach-imx/mx6/Kconfig | 5 ----- arch/arm/mach-imx/mx7ulp/Kconfig | 1 - arch/arm/mach-imx/mxs/Kconfig | 3 +++ arch/arm/mach-omap2/Kconfig | 1 + arch/arm/mach-tegra/tegra124/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra30/Kconfig | 2 ++ arch/mips/Kconfig | 1 + arch/powerpc/Kconfig | 1 + 14 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c51f15fcf465..2838b1e87dbd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -605,6 +605,7 @@ config ARCH_MVEBU
config ARCH_ORION5X bool "Marvell Orion" + select ARCH_MISC_INIT select CPU_ARM926EJS select GPIO_EXTRA_HEADER select SPL_SEPARATE_BSS if SPL @@ -819,6 +820,7 @@ config ARCH_LPC32XX config ARCH_IMX8 bool "NXP i.MX8 platform" select ARM64 + select ARCH_MISC_INIT if FSL_CAAM select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_4 select SYS_FSL_SEC_LE @@ -832,6 +834,7 @@ config ARCH_IMX8 config ARCH_IMX8M bool "NXP i.MX8M platform" select ARM64 + select ARCH_MISC_INIT select GPIO_EXTRA_HEADER select MACH_IMX select SYS_FSL_HAS_SEC @@ -902,6 +905,7 @@ config ARCH_MX31
config ARCH_MX7ULP bool "NXP MX7ULP" + select ARCH_MISC_INIT if FSL_CAAM select BOARD_POSTCLK_INIT select CPU_V7A select GPIO_EXTRA_HEADER @@ -929,6 +933,7 @@ config ARCH_MX7
config ARCH_MX6 bool "Freescale MX6" + select ARCH_MISC_INIT select BOARD_POSTCLK_INIT select CPU_V7A select GPIO_EXTRA_HEADER @@ -1023,6 +1028,7 @@ config ARCH_QEMU
config ARCH_RMOBILE bool "Renesas ARM SoCs" + select ARCH_MISC_INIT if !RZA1 select DM select DM_SERIAL select GPIO_EXTRA_HEADER @@ -1198,6 +1204,7 @@ config ARCH_VERSAL_NET
config ARCH_VF610 bool "Freescale Vybrid" + select ARCH_MISC_INIT select CPU_V7A select GPIO_EXTRA_HEADER select IOMUX_SHARE_CONF_REG diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig index 3e292bf70e18..4546025195b9 100644 --- a/arch/arm/cpu/armv7/ls102xa/Kconfig +++ b/arch/arm/cpu/armv7/ls102xa/Kconfig @@ -1,5 +1,6 @@ config ARCH_LS1021A bool + select ARCH_MISC_INIT if FSL_CAAM select FSL_DEVICE_DISABLE select FSL_IFC if !QSPI_BOOT && !SD_BOOT_QSPI select LS102XA_STREAM_ID diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index a8b493e2f875..a42ede24f189 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -328,6 +328,7 @@ config ARCH_LX2160A
config FSL_LSCH2 bool + select ARCH_MISC_INIT if FSL_CAAM select SKIP_LOWLEVEL_INIT select SYS_FSL_CCSR_GUR_BE select SYS_FSL_CCSR_SCFG_BE diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 37d12d189586..c211a1bb687e 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -75,7 +75,6 @@ config TARGET_IMX8QM_MEK select BOARD_LATE_INIT select IMX8QM select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_CONGA_QMX8 @@ -98,7 +97,6 @@ config TARGET_IMX8QXP_MEK select BOARD_LATE_INIT select IMX8QXP select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
endchoice diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig index 5e4836b02feb..d6845c053718 100644 --- a/arch/arm/mach-imx/imx8m/Kconfig +++ b/arch/arm/mach-imx/imx8m/Kconfig @@ -51,7 +51,6 @@ config TARGET_IMX8MQ_EVK select IMX8MQ select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MQ_PHANBELL @@ -74,7 +73,6 @@ config TARGET_IMX8MM_EVK select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MM_ICORE_MX8MM @@ -126,7 +124,6 @@ config TARGET_KONTRON_MX8MM select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MN_BSH_SMM_S2 @@ -198,7 +195,6 @@ config TARGET_IMX8MP_EVK select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MP_VENICE @@ -250,7 +246,6 @@ config TARGET_IMX8MM_BEACON select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_IMX8MN_BEACON @@ -260,7 +255,6 @@ config TARGET_IMX8MN_BEACON select SUPPORT_SPL select IMX8M_LPDDR4 select FSL_CAAM - select ARCH_MISC_INIT select SPL_CRYPTO if SPL
config TARGET_PHYCORE_IMX8MM diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 7529b311f80e..5df41da8771b 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -364,7 +364,6 @@ config TARGET_MX6SABREAUTO select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SABRESD bool "mx6sabresd" @@ -376,7 +375,6 @@ config TARGET_MX6SABRESD select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SLEVK bool "mx6slevk" @@ -401,7 +399,6 @@ config TARGET_MX6SXSABRESD select DM_THERMAL select SUPPORT_SPL select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6SXSABREAUTO bool "mx6sxsabreauto" @@ -421,7 +418,6 @@ config TARGET_MX6UL_9X9_EVK select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6UL_14X14_EVK bool "mx6ul_14x14_evk" @@ -432,7 +428,6 @@ config TARGET_MX6UL_14X14_EVK select SUPPORT_SPL imply CMD_DM select FSL_CAAM - select ARCH_MISC_INIT
config TARGET_MX6UL_ENGICAM bool "Support Engicam GEAM6UL/Is.IoT" diff --git a/arch/arm/mach-imx/mx7ulp/Kconfig b/arch/arm/mach-imx/mx7ulp/Kconfig index 632c4bf6fa5e..e238e977a71a 100644 --- a/arch/arm/mach-imx/mx7ulp/Kconfig +++ b/arch/arm/mach-imx/mx7ulp/Kconfig @@ -41,7 +41,6 @@ config TARGET_MX7ULP_EVK select MX7ULP select SYS_ARCH_TIMER select FSL_CAAM - select ARCH_MISC_INIT
endchoice
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig index b2026a3758a5..797eaf83bda8 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -10,10 +10,12 @@ choice
config TARGET_MX23_OLINUXINO bool "Support mx23_olinuxino" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_MX23EVK bool "Support mx23evk" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_XFI3 @@ -41,6 +43,7 @@ choice
config TARGET_MX28EVK bool "Support mx28evk" + select ARCH_MISC_INIT select BOARD_EARLY_INIT_F
config TARGET_XEA diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 309b967b0dd5..e874060d283c 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -113,6 +113,7 @@ config AM43XX config AM33XX bool "AM33XX SoC" select ARM_CORTEX_A8_CVE_2017_5715 + select ARCH_MISC_INIT if USB select DM_EVENT select SPECIFY_CONSOLE_INDEX imply NAND_OMAP_ELM diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig index fb016aa46c90..b3f25fc0827d 100644 --- a/arch/arm/mach-tegra/tegra124/Kconfig +++ b/arch/arm/mach-tegra/tegra124/Kconfig @@ -6,6 +6,7 @@ choice
config TARGET_APALIS_TK1 bool "Toradex Apalis TK1 module" + select ARCH_MISC_INIT select ARCH_SUPPORT_PSCI select CPU_V7_HAS_NONSEC select CPU_V7_HAS_VIRT diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig index 955786c0c484..142290e97389 100644 --- a/arch/arm/mach-tegra/tegra20/Kconfig +++ b/arch/arm/mach-tegra/tegra20/Kconfig @@ -57,6 +57,7 @@ config TARGET_VENTANA
config TARGET_COLIBRI_T20 bool "Toradex Colibri T20 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT select TEGRA_UARTA_SDIO1
diff --git a/arch/arm/mach-tegra/tegra30/Kconfig b/arch/arm/mach-tegra/tegra30/Kconfig index 5619d1cd42f7..8f6f24a7a7ca 100644 --- a/arch/arm/mach-tegra/tegra30/Kconfig +++ b/arch/arm/mach-tegra/tegra30/Kconfig @@ -12,6 +12,7 @@ choice
config TARGET_APALIS_T30 bool "Toradex Apalis T30 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT
config TARGET_BEAVER @@ -26,6 +27,7 @@ config TARGET_CARDHU
config TARGET_COLIBRI_T30 bool "Toradex Colibri T30 board" + select ARCH_MISC_INIT select BOARD_LATE_INIT
config TARGET_TEC_NG diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 569f5f48bc6c..536b6ad64aa9 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -98,6 +98,7 @@ config ARCH_JZ47XX config ARCH_OCTEON bool "Support Marvell Octeon CN7xxx platforms" select ARCH_EARLY_INIT_R + select ARCH_MISC_INIT select CPU_CAVIUM_OCTEON select DISPLAY_CPUINFO select DMA_ADDR_T_64BIT diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index bee59c3bea4f..93bc1a4b6b3f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -17,6 +17,7 @@ config MPC83xx
config MPC85xx bool "MPC85xx" + select ARCH_MISC_INIT if FSL_CAAM && !(ARCH_P1010 || TARGET_KMCENT2) select CREATE_ARCH_SYMLINK select SYS_FSL_DDR select SYS_FSL_DDR_BE

On 2/17/23 13:50, Tom Rini wrote:
When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Signed-off-by: Tom Rini trini@konsulko.com
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com
Changes in v2:
- Always select ARCH_MISC_INIT on IMX8M as dealing with FSL_CAAM or not needs further SoC-specific clean up work. This replaces patches 10 and 11 from before so that if the user enables FSL_CAAM then they will continue to get the functionality they had before. As Marek noted in the thread, further clean-up in this area would be good.
The SPL code does not automatically call arch_misc_init() if ARCH_MISC_INIT is selected , so this won't work as-is. Is there another patch on which I wasn't CCed which deals with that ?

On Fri, Feb 17, 2023 at 02:33:28PM +0100, Marek Vasut wrote:
On 2/17/23 13:50, Tom Rini wrote:
When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Signed-off-by: Tom Rini trini@konsulko.com
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com
Changes in v2:
- Always select ARCH_MISC_INIT on IMX8M as dealing with FSL_CAAM or not needs further SoC-specific clean up work. This replaces patches 10 and 11 from before so that if the user enables FSL_CAAM then they will continue to get the functionality they had before. As Marek noted in the thread, further clean-up in this area would be good.
The SPL code does not automatically call arch_misc_init() if ARCH_MISC_INIT is selected , so this won't work as-is. Is there another patch on which I wasn't CCed which deals with that ?
This preserves the exiting behavior, nothing more.

On 2/17/23 15:00, Tom Rini wrote:
On Fri, Feb 17, 2023 at 02:33:28PM +0100, Marek Vasut wrote:
On 2/17/23 13:50, Tom Rini wrote:
When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Signed-off-by: Tom Rini trini@konsulko.com
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com
Changes in v2:
- Always select ARCH_MISC_INIT on IMX8M as dealing with FSL_CAAM or not needs further SoC-specific clean up work. This replaces patches 10 and 11 from before so that if the user enables FSL_CAAM then they will continue to get the functionality they had before. As Marek noted in the thread, further clean-up in this area would be good.
The SPL code does not automatically call arch_misc_init() if ARCH_MISC_INIT is selected , so this won't work as-is. Is there another patch on which I wasn't CCed which deals with that ?
This preserves the exiting behavior, nothing more.
Where does the arch_misc_init() get called from in SPL ? If that remains in board code for now, then yeah, fine by me.

On Fri, Feb 17, 2023 at 03:40:28PM +0100, Marek Vasut wrote:
On 2/17/23 15:00, Tom Rini wrote:
On Fri, Feb 17, 2023 at 02:33:28PM +0100, Marek Vasut wrote:
On 2/17/23 13:50, Tom Rini wrote:
When we have an arch_misc_init function, we can select it to ensure it's used.
In that there is a functional change here, it's that on i.MX6 it's always been possible to populate "serial#" with something meaningful, but not every platform was taking the hook, and now it is.
Signed-off-by: Tom Rini trini@konsulko.com
Cc: Marcel Ziswiler marcel.ziswiler@toradex.com Cc: Marek Vasut marex@denx.de Cc: Olaf Mandel o.mandel@menlosystems.com Cc: Stefano Babic sbabic@denx.de Cc: Fabio Estevam festevam@gmail.com Cc: NXP i.MX U-Boot Team uboot-imx@nxp.com
Changes in v2:
- Always select ARCH_MISC_INIT on IMX8M as dealing with FSL_CAAM or not needs further SoC-specific clean up work. This replaces patches 10 and 11 from before so that if the user enables FSL_CAAM then they will continue to get the functionality they had before. As Marek noted in the thread, further clean-up in this area would be good.
The SPL code does not automatically call arch_misc_init() if ARCH_MISC_INIT is selected , so this won't work as-is. Is there another patch on which I wasn't CCed which deals with that ?
This preserves the exiting behavior, nothing more.
Where does the arch_misc_init() get called from in SPL ? If that remains in board code for now, then yeah, fine by me.
Yes, it's still on the board to call arch_misc_init() inside spl_board_init().

As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text.
Signed-off-by: Tom Rini trini@konsulko.com --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig index e35fca69823d..866e3b153f5b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -641,7 +641,7 @@ config ARCH_EARLY_INIT_R enabled. This can be used to set up architecture-specific devices.
config ARCH_MISC_INIT - bool "Call arch-specific init after relocation, when console is ready" + bool help With this option U-Boot will call arch_misc_init() after relocation to allow miscellaneous arch-dependent initialisation

On Wed, 15 Feb 2023 at 20:39, Tom Rini trini@konsulko.com wrote:
As platforms which require this hook need this hook enabled, in order to function, or do not need this hook, it doesn't make sense to prompt the user. As all platforms that need this hook now select the symbol, remove the prompt text.
Signed-off-by: Tom Rini trini@konsulko.com
common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, 15 Feb 2023 at 20:37, Tom Rini trini@konsulko.com wrote:
While it is true that for some Samsung platforms, we call get_board_type() the main usage of this CONFIG switch is to enable board_types in global data, which is then used by various platforms.
Signed-off-by: Tom Rini trini@konsulko.com
common/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

On Wed, Feb 15, 2023 at 10:36:47PM -0500, Tom Rini wrote:
While it is true that for some Samsung platforms, we call get_board_type() the main usage of this CONFIG switch is to enable board_types in global data, which is then used by various platforms.
Signed-off-by: Tom Rini trini@konsulko.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/next, thanks!
participants (11)
-
Chris Packham
-
Francesco Dolcini
-
Marcel Ziswiler
-
Marek Vasut
-
Michal Simek
-
Minkyu Kang
-
Peng Fan
-
Quentin Schulz
-
Simon Glass
-
Stefan Roese
-
Tom Rini