Add CONFIG_QCOM_SNAGBOOT_MODE to enable snagboot mode on Qualcomm
platforms. This config automatically selects the required dependencies
for Snagboot mode.

Add QCOM_BOOT0_SNAGBOOT_MODE as a hidden boot0.h config, selected
automatically by QCOM_SNAGBOOT_MODE. This boot0.h config is for
disabling MMU at the start of U-Boot execution.

Signed-off-by: Balaji Selvanathan <[email protected]>
---
Changes in v10:
- Depend on ENV_IS_DEFAULT instead of selecting ENV_IS_NOWHERE and
  depending on !ENV_IS_IN_SCSI
- Drop depends on COUNTER_FREQUENCY != 0
- Drop depends on TEXT_BASE != 0x0
- Drop depends on !PSCI_RESET and !SAVE_PREV_BL_INITRAMFS_START_ADDR

Changes in v9:
- Remove depends on !IOMMU from QCOM_SNAGBOOT_MODE

Changes in v7:
- No changes

Changes in v5:
- Made QCOM_BOOT0_SNAGBOOT_MODE dependent on QCOM_SNAGBOOT_MODE so
  it is not exposed to users
- Add dependencies for QCOM_SNAGBOOT_MODE explicitly as "depends"

Changes in v4:
- Renamed QCOM_SNAGBOOT_SUPPORT to QCOM_SNAGBOOT_MODE
- Added QCOM_BOOT0_SNAGBOOT_MODE for boot0.h which gets selected by
  QCOM_SNAGBOOT_MODE
- Document the platform-specific requirements and configs that must be
  disabled in snagboot mode.

Changes in v3:
- Newly introduced in v3
---
 arch/arm/mach-snapdragon/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
index 2c182c7b974..2c6fd78a186 100644
--- a/arch/arm/mach-snapdragon/Kconfig
+++ b/arch/arm/mach-snapdragon/Kconfig
@@ -90,4 +90,18 @@ config QCOM_EL2_GUNYAH_EXIT_SUPPORT
 
 endchoice
 
+config QCOM_BOOT0_SNAGBOOT_MODE
+       bool
+       depends on QCOM_SNAGBOOT_MODE
+
+config QCOM_SNAGBOOT_MODE
+       bool "Build U-Boot for Snagboot mode loading"
+       select QCOM_BOOT0_SNAGBOOT_MODE
+       select ENABLE_ARM_SOC_BOOT0_HOOK
+       select SKIP_RELOCATE
+       depends on ENV_IS_DEFAULT
+       help
+         Build U-Boot to be loaded in Snagboot mode on Qualcomm platforms
+         for device/factory provisioning using fastboot.
+
 endif

-- 
2.34.1

Reply via email to