All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: michael.srba@seznam.cz
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io,
	Tom Rini <trini@konsulko.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Simon Glass <sjg@chromium.org>,
	Sughosh Ganu <sughosh.ganu@arm.com>,
	Anshul Dalal <anshuld@ti.com>, Peng Fan <peng.fan@nxp.com>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Andrew Davis <afd@ti.com>, Hrushikesh Salunke <h-salunke@ti.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Ye Li <ye.li@nxp.com>, Andre Przywara <andre.przywara@arm.com>,
	Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>,
	Leo Yu-Chi Liang <ycliang@andestech.com>,
	Andrew Goodbody <andrew.goodbody@linaro.org>,
	Dhruva Gole <d-gole@ti.com>,
	Kaustabh Chakraborty <kauschluss@disroot.org>,
	Jerome Forissier <jerome.forissier@arm.com>,
	Heiko Schocher <hs@nabladev.com>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Lukasz Majewski <lukma@denx.de>,
	Mateusz Kulikowski <mateusz.kulikowski@gmail.com>,
	Dinesh Maniyam <dinesh.maniyam@altera.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Michal Simek <michal.simek@amd.com>, Yao Zi <me@ziyao.cc>,
	Peter Korsgaard <peter@korsgaard.com>,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Casey Connolly <casey.connolly@linaro.org>,
	Tingting Meng <tingting.meng@altera.com>,
	Tien Fong Chee <tien.fong.chee@altera.com>,
	Alice Guo <alice.guo@nxp.com>, George Chan <gchan9527@gmail.com>,
	Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>,
	Alexey Charkov <alchark@gmail.com>,
	Ronald Wahl <ronald.wahl@legrand.com>,
	Michael Trimarchi <michael@amarulasolutions.com>
Subject: Re: [PATCH v4 07/11] mach-snapdragon: Kconfig: changes / additions to support SPL
Date: Fri, 1 May 2026 13:01:17 +0530	[thread overview]
Message-ID: <afRWxQuPPQBjVdPw@sumit-xelite> (raw)
In-Reply-To: <20260426-qcom_spl-v4-7-8cf4133ff883@seznam.cz>

On Sun, Apr 26, 2026 at 01:26:09AM +0200, michael.srba@seznam.cz wrote:
> From: Michael Srba <Michael.Srba@seznam.cz>
> 
> 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@seznam.cz>
> ---
>  arch/arm/Kconfig                 | 34 +++++++++++++++++++++++++++++++++-
>  arch/arm/mach-snapdragon/Kconfig | 31 ++++++++++++++++++++++++++++---
>  2 files changed, 61 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 03416c55265..ddabc23fc9e 100644
> --- 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
>  	select DM_GPIO
>  	select DM_SERIAL
>  	select DM_RESET
> @@ -1138,9 +1139,40 @@ 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
> +	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_REAL 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 f82cd0d3291..3b5ae6d98fb 100644
> --- a/arch/arm/mach-snapdragon/Kconfig
> +++ b/arch/arm/mach-snapdragon/Kconfig
> @@ -17,9 +17,6 @@ config SYS_MALLOC_F_LEN
>  config SPL_SYS_MALLOC_F
>  	default y
>  
> -config SPL_SYS_MALLOC_F_LEN
> -	default 0x2000
> -
>  config SYS_MALLOC_LEN
>  	default 0x800000
>  
> @@ -42,4 +39,32 @@ 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
> +	default n
> +
> +config SPL_HAVE_INIT_STACK
> +	default y
> +
> +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).

In Qualcomm ecosystem, we have been avoiding any SoC or board specific
config options in an effort to try people migrate to use generic platform
code only.

I think this boot0.h hook code is going to be one exception. Can you
rather define a special Kconfig option for this saying?

	BOOT0_SDM845_WORKAROUND

which can then be enabled in your special defconfig.

-Sumit

  parent reply	other threads:[~2026-05-01 12:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-25 23:26 [PATCH v4 00/11] Add SPL support for Qualcomm platforms, starting with sdm845 michael.srba
2026-04-25 23:26 ` [PATCH v4 01/11] Makefile: add SPL_REMAKE_ELF_LDSCRIPT feature michael.srba
2026-04-28 18:27   ` Simon Glass
2026-04-25 23:26 ` [PATCH v4 02/11] of_live: support in SPL michael.srba
2026-04-25 23:26 ` [PATCH v4 03/11] drivers: allow clk_stub and spmi " michael.srba
2026-04-29 14:18   ` Simon Glass
2026-04-25 23:26 ` [PATCH v4 04/11] mach-snapdragon: boot0.h: split out msm8916_boot0.h michael.srba
2026-05-01 10:10   ` Sumit Garg
2026-05-01 13:38     ` Michael Srba
2026-04-25 23:26 ` [PATCH v4 05/11] mach-snapdragon: add u-boot-spl-elf-sdm845.lds michael.srba
2026-04-25 23:26 ` [PATCH v4 06/11] mach-snapdragon: Kconfig: fix duplicate SYS_MALLOC_LEN michael.srba
2026-04-25 23:26 ` [PATCH v4 07/11] mach-snapdragon: Kconfig: changes / additions to support SPL michael.srba
2026-04-29 14:22   ` Simon Glass
2026-05-01  7:31   ` Sumit Garg [this message]
2026-04-25 23:26 ` [PATCH v4 08/11] mach-snapdragon: boot0.h: add sdm845_spl_boot0.h michael.srba
2026-04-25 23:26 ` [PATCH v4 09/11] mach-snapdragon: add board_spl.c and split out common code michael.srba
2026-04-25 23:26 ` [PATCH v4 10/11] qualcomm: add defconfig, env and docs for SPL on sdm845 michael.srba
2026-04-25 23:26 ` [PATCH v4 11/11] dts: add u-boot specific sdm845 .dtsi and a .dtsi for shift-axolotl michael.srba
2026-05-01  7:35   ` Sumit Garg
2026-05-01 13:04     ` Michael Srba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afRWxQuPPQBjVdPw@sumit-xelite \
    --to=sumit.garg@kernel.org \
    --cc=afd@ti.com \
    --cc=alchark@gmail.com \
    --cc=alice.guo@nxp.com \
    --cc=alif.zakuan.yuslaimi@altera.com \
    --cc=andre.przywara@arm.com \
    --cc=andrew.goodbody@linaro.org \
    --cc=anshuld@ti.com \
    --cc=balaji.selvanathan@oss.qualcomm.com \
    --cc=casey.connolly@linaro.org \
    --cc=d-gole@ti.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=dinesh.maniyam@altera.com \
    --cc=gchan9527@gmail.com \
    --cc=h-salunke@ti.com \
    --cc=hs@nabladev.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerome.forissier@arm.com \
    --cc=kauschluss@disroot.org \
    --cc=lukma@denx.de \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=mateusz.kulikowski@gmail.com \
    --cc=me@ziyao.cc \
    --cc=michael.srba@seznam.cz \
    --cc=michael@amarulasolutions.com \
    --cc=michal.simek@amd.com \
    --cc=mkorpershoek@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=peng.fan@nxp.com \
    --cc=peter@korsgaard.com \
    --cc=quentin.schulz@cherry.de \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=ronald.wahl@legrand.com \
    --cc=sjg@chromium.org \
    --cc=sughosh.ganu@arm.com \
    --cc=tien.fong.chee@altera.com \
    --cc=tingting.meng@altera.com \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    --cc=ycliang@andestech.com \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.