From: Michael Srba <[email protected]>

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 (SPL_)EVENT, which are needed to fix up
upstream dt to make usb work, and in general don't make sense to
disable in SPL as long as we're not running out of SRAM.

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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
---
 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..65910d014ea 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1139,6 +1139,7 @@ config ARCH_SNAPDRAGON
        select DM_GPIO
        select DM_SERIAL
        select DM_RESET
+       select EVENT
        select POWER_DOMAIN
        select GPIO_EXTRA_HEADER
        select OF_CONTROL
@@ -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
+       select SPL_OF_LIVE
+       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
+       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

-- 
2.54.0

Reply via email to