Add a new SPL_UFS_QCOM Kconfig option to allow the Qualcomm UFS host controller driver to be built for SPL on Snapdragon platforms.
Switch the ufs-uclass.o and ufs-qcom.o Makefile rules to use the $(PHASE_) prefix macro so that the correct config symbol (UFS/SPL_UFS and UFS_QCOM/SPL_UFS_QCOM) is selected automatically depending on whether SPL or U-Boot proper is being compiled. Signed-off-by: Balaji Selvanathan <[email protected]> --- Changes in v2: - Modified the Makefiles rules to use $(PHASE_) prefix instead of using SPL_UFS_SUPPORT config --- --- drivers/ufs/Kconfig | 8 ++++++++ drivers/ufs/Makefile | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/Kconfig b/drivers/ufs/Kconfig index 64172454bc6..0e03d7ef438 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 && ARCH_SNAPDRAGON + 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..c15635c01bc 100644 --- a/drivers/ufs/Makefile +++ b/drivers/ufs/Makefile @@ -3,13 +3,14 @@ # Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com # -obj-$(CONFIG_UFS) += ufs-uclass.o +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 + -- 2.34.1

