]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
global: Make ARCH_MISC_INIT a selected symbol
authorTom Rini <trini@konsulko.com>
Fri, 4 Jul 2025 21:45:42 +0000 (15:45 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Jul 2025 17:33:25 +0000 (11:33 -0600)
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>
arch/arm/Kconfig
arch/arm/cpu/armv7/ls102xa/Kconfig
arch/arm/cpu/armv8/fsl-layerscape/Kconfig
arch/arm/mach-imx/imx9/Kconfig
arch/arm/mach-imx/mx6/Kconfig
arch/arm/mach-omap2/am33xx/Kconfig
arch/mips/mach-octeon/Kconfig
board/toradex/verdin-imx8mm/spl.c
common/Kconfig

index 396a80f768fb43efb8f2e993286f6699da7e2fed..5872455a0fe56d0191b820fb6d269b2c99975c38 100644 (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
index 46ace7e5fd68d65e887dbeda665966598fcd207a..5c8839583aa6922b508b030c4d33a054a1582eb5 100644 (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
index 080fe3fc327d02926b674177fcfc57c4845e4ba9..787c7a7c1da6c050908887e9c7749e90be4513f8 100644 (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
index 280d255c08643aedaa25a097a12e9d346c03a228..6af45938edb3a3f70ead046d61909ae5be78cb22 100644 (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
index 2f873ed6ddf1bce11ad2e59d37cedc1324c24e6d..3f5e91da204f2570ca452326678108822f74705c 100644 (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
index 46abf070f9d5aefb8a94e7544577641480aef939..dff4f1cf202f4a59157cfd6c666d3601a80c9f2a 100644 (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
index 5d2186bba551dda51182f97e9000b4169a811817..6105cdcf96ea4ee60f7ec53e057788f0c1ba04fb 100644 (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
index 1020078afea27678b86f5ad5f3e37488cf5d2eb4..3c2d0ba1dd463236a990eb397ee8bb16b73d878a 100644 (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
index 17539079f90f21d099227bf8e9feb0f37154595a..a2f653f7e722a57d195eb3bd51be8fed0cd291a8 100644 (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