[PATCH v4 07/11] mach-snapdragon: Kconfig: changes / additions to support SPL

Simon Glass sjg at chromium.org
Wed Apr 29 16:22:23 CEST 2026


Hi Michael,

On 2026-04-25T23:26:13, Michael Srba <michael.srba at seznam.cz> wrote:
> mach-snapdragon: Kconfig: changes / additions to support SPL
>
> An SoC to target has to be selected, e.g. TARGET_SDM845.
> This will enable the per-SoC boot0.h.
>
> Signed-off-by: Michael Srba <Michael.Srba at seznam.cz>
>
> arch/arm/Kconfig                 | 34 +++++++++++++++++++++++++++++++++-
>  arch/arm/mach-snapdragon/Kconfig | 31 ++++++++++++++++++++++++++++---
>  2 files changed, 61 insertions(+), 4 deletions(-)

> diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
> @@ -42,4 +39,32 @@ config SYS_CONFIG_NAME
> +choice
> +     prompt "Qualcomm SoC select"
> +     default TARGET_NONE if !SPL
> +     help
> +       While U-Boot on Qualcomm platforms doesn't generally need compile-time
> +       adjustment based on the target SoC, there are a few exceptions to this.
> +       Currently this concerns boot0.h discrimination.
> +
> +config TARGET_NONE
> +     bool "Generic build"
> +     help
> +       Select this if you're not building SPL. U-Boot proper builds are currently
> +       generic across all SoCs.
> +
> +config TARGET_SDM845
> +     bool "SPL targeting the sdm845 SoC"
> +     help
> +       Select this if you are building u-boot SPL for sdm845.
> +       Currently this gates sdm845-specific boot0.h (only used in SPL).
> +
> +endchoice

A few things:

- TARGET_NONE only exists to give the choice a default for !SPL. Can
you instance make the choice 'optional' and drop TARGET_NONE, so a
U-Boot proper build simply has no SoC selected?
- Neither option is gated, so a user can pick TARGET_NONE with SPL=y
or TARGET_SDM845 with SPL=n, both of which contradict the help. So
TARGET_SDM845 should at least have 'depends on SPL'.
- TARGET_* is conventionally a board identifier (TARGET_RPI_4,
TARGET_SNOW, ...), not an SoC. SOC_SDM845 would match the existing
pattern and avoid colliding with a future SDM845 board target.

Also please expand the commit message to cover the choice mechanism,
why SYSRESET_PSCI is excluded for SPL (EL3 / no PSCI provider), and
why SUPPORT_SPL is now selected unconditionally.

> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> @@ -1124,6 +1124,7 @@ config ARCH_SNAPDRAGON
>       bool "Qualcomm Snapdragon SoCs"
>       select ARM64
>       select DM
> +     select DM_EVENT if USB_DWC3_GENERIC || SPL_USB_DWC3_GENERIC

DM_EVENT is the U-Boot-proper symbol, so SPL_USB_DWC3_GENERIC will
pull it into U-Boot proper as well - the SPL side is already covered
by 'select SPL_EVENT if SPL_USB_DWC3_GENERIC' below. You should be
able to drop the SPL_USB_DWC3_GENERIC term here.

> diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
> @@ -42,4 +39,32 @@ config SYS_CONFIG_NAME
> +config SPL_SHARES_INIT_SP_ADDR
> +     default n

'n' is already the default for a bool, so this is a no-op - please
drop it, or add a comment if the intent is to override the 'default y'
in common/spl/Kconfig.

Regards,
Simon


More information about the U-Boot mailing list