global: Make ARCH_MISC_INIT a selected symbol

This symbol is not something that the user should be enabling or
disabling but rather the developer for a particular board should select
it when required.

This is mostly size neutral, however a few places do have changes. In
the case of i.MX6ULL systems, it is always the case that
arch_misc_init() could call setup_serial_number() and do useful work,
but was not enabled widely, but now is. In the case of i.MX23/28
systems, we should be able to call mx28_fixup_vt() again here, so do so.
Finally, some platforms were calling arch_misc_init() and then not doing
anything and this results in removing the option.

Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini
2025-07-04 15:45:42 -06:00
parent 0d50d5fc52
commit d0ed963690
9 changed files with 20 additions and 4 deletions

View File

@@ -906,6 +906,7 @@ config ARCH_IMX8
config ARCH_IMX8M
bool "NXP i.MX8M platform"
select ARCH_MISC_INIT if FSL_CAAM
select ARM64
select GPIO_EXTRA_HEADER
select MACH_IMX
@@ -955,6 +956,7 @@ config ARCH_IMXRT
config ARCH_MX23
bool "NXP i.MX23 family"
select ARCH_MISC_INIT
select CPU_ARM926EJS
select GPIO_EXTRA_HEADER
select MACH_IMX
@@ -962,6 +964,7 @@ config ARCH_MX23
config ARCH_MX28
bool "NXP i.MX28 family"
select ARCH_MISC_INIT
select CPU_ARM926EJS
select GPIO_EXTRA_HEADER
select MACH_IMX
@@ -1103,6 +1106,7 @@ config ARCH_QEMU
config ARCH_RENESAS
bool "Renesas ARM SoCs"
select ARCH_MISC_INIT if DISPLAY_CPUINFO && !(RZA1 || RZN1)
select DM
select DM_SERIAL
select GPIO_EXTRA_HEADER
@@ -1112,7 +1116,6 @@ config ARCH_RENESAS
imply FAT_WRITE
imply OF_UPSTREAM
imply SYS_THUMB_BUILD
imply ARCH_MISC_INIT if DISPLAY_CPUINFO
config ARCH_SNAPDRAGON
bool "Qualcomm Snapdragon SoCs"
@@ -1541,7 +1544,6 @@ config TARGET_LX2160AQDS
config TARGET_LX2162AQDS
bool "Support lx2162aqds"
select ARCH_LX2162A
select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT
@@ -1954,7 +1956,6 @@ config TARGET_SL28
config TARGET_TEN64
bool "Support ten64"
select ARCH_LS1088A
select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
select ARCH_SUPPORT_TFABOOT

View File

@@ -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

View File

@@ -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

View File

@@ -22,10 +22,12 @@ config IMX93
config IMX91
bool
select IMX9
select ARCH_MISC_INIT
select ARMV8_SPL_EXCEPTION_VECTORS
config IMX95
bool
select ARCH_MISC_INIT
select ARMV8_SPL_EXCEPTION_VECTORS
select IMX9
select DM_MAILBOX

View File

@@ -63,6 +63,7 @@ config MX6UL
config MX6ULL
bool "i.MX 6ULL SoC support"
select ARCH_MISC_INIT
select ROM_UNIFIED_SECTIONS
select SYSCOUNTER_TIMER
select SYS_L2CACHE_OFF

View File

@@ -9,6 +9,7 @@ choice
config TARGET_AM335X_EVM
bool "Support am335x_evm"
select ARCH_MISC_INIT
select BOARD_LATE_INIT
select DM
select DM_GPIO
@@ -70,6 +71,7 @@ config TARGET_AM335X_SHC
config TARGET_AM335X_GUARDIAN
bool "Support am335x based guardian board from bosch"
select ARCH_MISC_INIT
select BOARD_LATE_INIT
select DM
select DM_SERIAL
@@ -116,6 +118,7 @@ config TARGET_ETAMIN
config TARGET_PCM051
bool "Support pcm051"
select ARCH_MISC_INIT
select DM
select DM_GPIO
select DM_SERIAL
@@ -123,6 +126,7 @@ config TARGET_PCM051
config TARGET_PHYCORE_AM335X_R2
bool "Support phyCORE AM335X R2"
select ARCH_MISC_INIT
select DM
select DM_GPIO
select DM_SERIAL
@@ -130,6 +134,7 @@ config TARGET_PHYCORE_AM335X_R2
config TARGET_PXM2
bool "Support pxm2"
select ARCH_MISC_INIT
select BOARD_LATE_INIT
select DM
select DM_GPIO
@@ -148,6 +153,7 @@ config TARGET_RASTABAN
config TARGET_RUT
bool "Support rut"
select ARCH_MISC_INIT
select BOARD_LATE_INIT
select DM
select DM_GPIO

View File

@@ -42,6 +42,7 @@ config TARGET_OCTEON_EBB7304
config TARGET_OCTEON_NIC23
bool "Marvell Octeon NIC23"
select ARCH_MISC_INIT
select OCTEON_CN73XX
help
Choose this for the Octeon NIC23 board

View File

@@ -53,7 +53,9 @@ void spl_dram_init(void)
void spl_board_init(void)
{
#if IS_ENABLED(CONFIG_ARCH_MISC_INIT)
arch_misc_init();
#endif
}
#ifdef CONFIG_SPL_LOAD_FIT

View File

@@ -704,8 +704,9 @@ 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
Call arch-specific init after relocation, when console is ready.
With this option U-Boot will call arch_misc_init() after
relocation to allow miscellaneous arch-dependent initialisation
to be performed. This function should be defined by the board