[PATCH 2/4] drivers: ufs: qcom: Add SPL support

Sumit Garg sumit.garg at kernel.org
Mon Apr 13 14:37:19 CEST 2026


On Thu, Apr 09, 2026 at 08:13:32PM +0530, Balaji Selvanathan wrote:
> Enable Qualcomm UFS driver to be built for SPL. The ufs-uclass is
> also built conditionally based on whether SPL or
> U-Boot proper is being compiled.
> 
> Signed-off-by: Balaji Selvanathan <balaji.selvanathan at oss.qualcomm.com>
> ---
>  drivers/ufs/Kconfig  | 8 ++++++++
>  drivers/ufs/Makefile | 7 ++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/Kconfig b/drivers/ufs/Kconfig
> index 49472933de3..a32d51cae1d 100644
> --- a/drivers/ufs/Kconfig
> +++ b/drivers/ufs/Kconfig
> @@ -55,6 +55,14 @@ config UFS_QCOM
>  	  This selects the platform driver for the UFS host
>  	  controller present on Qualcomm Snapdragon SoCs.
>  
> +config SPL_UFS_QCOM
> +	bool "Qualcomm Host Controller driver for UFS in SPL"
> +	depends on SPL_UFS_SUPPORT && ARCH_SNAPDRAGON

Rather than SPL_UFS_SUPPORT, you can just say SPL_UFS which will
simplify below..

> +	help
> +	  This selects the platform driver for the UFS host
> +	  controller present on Qualcomm Snapdragon SoCs for use in SPL.
> +	  Enable this to use UFS as a boot device in SPL on Qualcomm platforms.
> +
>  config UFS_RENESAS
>  	bool "Renesas R-Car S4 UFS Controller support"
>  	depends on UFS
> diff --git a/drivers/ufs/Makefile b/drivers/ufs/Makefile
> index e7f3c1d30c4..7056066ce25 100644
> --- a/drivers/ufs/Makefile
> +++ b/drivers/ufs/Makefile
> @@ -3,13 +3,18 @@
>  # Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com
>  #
>  
> +ifdef CONFIG_SPL_BUILD
> +obj-$(CONFIG_SPL_UFS_SUPPORT) += ufs-uclass.o
> +else
>  obj-$(CONFIG_UFS) += ufs-uclass.o
> +endif

..to:

obj-$(CONFIG_$(PHASE_)UFS) += ufs-uclass.o

>  obj-$(CONFIG_UFS_AMD_VERSAL2) += ufs-amd-versal2.o ufshcd-dwc.o
>  obj-$(CONFIG_UFS_CADENCE) += cdns-platform.o
>  obj-$(CONFIG_UFS_MEDIATEK) += ufs-mediatek.o
>  obj-$(CONFIG_UFS_PCI) += ufs-pci.o
> -obj-$(CONFIG_UFS_QCOM) += ufs-qcom.o
> +obj-$(CONFIG_$(PHASE_)UFS_QCOM) += ufs-qcom.o
>  obj-$(CONFIG_UFS_RENESAS) += ufs-renesas.o
>  obj-$(CONFIG_UFS_RENESAS_GEN5) += ufs-renesas-rcar-gen5.o
>  obj-$(CONFIG_UFS_ROCKCHIP) += ufs-rockchip.o
>  obj-$(CONFIG_UFS_TI_J721E) += ti-j721e-ufs.o
> +

Drop un-necessary blank line added here.

-Sumit


More information about the U-Boot mailing list