[PATCH v8 07/12] mach-snapdragon: Kconfig: changes / additions to support SPL
Michael Srba
Michael.Srba at seznam.cz
Mon May 18 22:25:05 CEST 2026
Hi,
On 5/18/26 10:40, Casey Connolly wrote:
> Hi Michael,
>
> On 16/05/2026 20:19, michael.srba at seznam.cz wrote:
>> From: Michael Srba <Michael.Srba at seznam.cz>
>>
>> Select SUPPORT_SPL so SPL build can be enabled, disable SYSRESET_PSCI in SPL.
>> (SPL runs in EL3, so if SPL itself doesn't provide PSCI, nothing else will.)
>>
>> Also select (SPL_)OF_LIVE and DM_EVENT/SPL_EVENT, which are needed to fix up
>> upstream dt to make usb work.
>>
>> Mirror u-boot proper selections like GPIO and pinctrl to ensure consistent
>> behavior, and select SPL_SPRINTF, SPL_LIBCOMMON_SUPPORT etc for similar
>> reasons.
>>
>> Signed-off-by: Michael Srba <Michael.Srba at seznam.cz>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>> ---
>> arch/arm/Kconfig | 33 ++++++++++++++++++++++++++++++++-
>> arch/arm/mach-snapdragon/Kconfig | 10 ++++++++++
>> 2 files changed, 42 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index 850768282ce..255d2035cdc 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -1136,6 +1136,7 @@ config ARCH_SNAPDRAGON
>> bool "Qualcomm Snapdragon SoCs"
>> select ARM64
>> select DM
>> + select DM_EVENT if USB_DWC3_GENERIC
> Is there any reason not to make this uncoditional?
Well, my understanding is that it's only relevant if something registers
to receive an event. Maybe some stuff just has a slower path but would
benefit from this? I don't know, all I know is that the fixup has a hard
dependency on it.
>
>> select DM_GPIO
>> select DM_SERIAL
>> select DM_RESET
>> @@ -1149,9 +1150,39 @@ config ARCH_SNAPDRAGON
>> select SAVE_PREV_BL_FDT_ADDR if !ENABLE_ARM_SOC_BOOT0_HOOK
>> select LINUX_KERNEL_IMAGE_HEADER if !ENABLE_ARM_SOC_BOOT0_HOOK
>> select SYSRESET
>> - select SYSRESET_PSCI
>> + select SYSRESET_PSCI if !SPL
>> select ANDROID_BOOT_IMAGE_IGNORE_BLOB_ADDR
>> select MMU_PGPROT
>> + select SUPPORT_SPL
>> +
>> + select OF_LIVE if USB_DWC3_GENERIC
> Same here, OF_LIVE carries performance benefits too besides the fixup stuff.
I wasn't aware of that, if that's the case there's probably no reason to ever
not enable it.
>> + select SPL_OF_LIVE if SPL_USB_DWC3_GENERIC
>> + select ARMV8_SPL_EXCEPTION_VECTORS if SPL
>> + select ENABLE_ARM_SOC_BOOT0_HOOK if SPL
>> + select SPL_DM if SPL
>> + select SPL_DM_GPIO if SPL
>> + select SPL_DM_PMIC if SPL
>> + select SPL_DM_USB_GADGET if SPL
>> + select SPL_ENV_SUPPORT if SPL
>> + select SPL_EVENT if SPL_USB_DWC3_GENERIC
>> + select SPL_GPIO if SPL
>> + select SPL_HAS_BSS_LINKER_SECTION if SPL
>> + select SPL_LIBCOMMON_SUPPORT if SPL
>> + select SPL_LIBDISK_SUPPORT if SPL
>> + select SPL_LIBGENERIC_SUPPORT if SPL
>> + select SPL_OF_CONTROL if SPL
>> + select SPL_PINCONF if SPL
>> + select SPL_PINCTRL if SPL
>> + select SPL_PINCTRL_FULL if SPL
>> + select SPL_PINCTRL_GENERIC if SPL
>> + select SPL_PINCONF_RECURSIVE if SPL
>> + select SPL_PINMUX if SPL
>> + select SPL_SPMI if SPL
>> + select SPL_SPMI_MSM if SPL
>> + select SPL_SPRINTF if SPL
>> + select SPL_STRTO if SPL
>> + select SPL_USB_GADGET if SPL
>> + imply SPL_MMC if SPL
>> imply OF_UPSTREAM
>> imply CMD_DM
>> imply DM_USB_GADGET
>> diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
>> index c195d478512..a2228e217af 100644
>> --- a/arch/arm/mach-snapdragon/Kconfig
>> +++ b/arch/arm/mach-snapdragon/Kconfig
>> @@ -14,6 +14,9 @@ config SYS_VENDOR
>> config SYS_MALLOC_F_LEN
>> default 0x2000
>>
>> +config SPL_SYS_MALLOC_F
>> + default y
>> +
>> config SPL_SYS_MALLOC_F_LEN
>> default 0x2000
>>
>> @@ -39,6 +42,13 @@ config SYS_CONFIG_NAME
>> Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header
>> will be used for board configuration.
>>
>> +config SPL_SHARES_INIT_SP_ADDR
>> + # override the default from common/spl/Kconfig
>> + default n
>> +
>> +config SPL_HAVE_INIT_STACK
>> + default y
>> +
>> choice
>> prompt "Qualcomm boot0.h workaround"
>> optional
>>
More information about the U-Boot
mailing list