Add a new SPL_PHY_QCOM_QMP_UFS Kconfig option to enable the
Qualcomm QMP UFS PHY driver in SPL on Snapdragon platforms.
This is a prerequisite for UFS boot support in SPL.

Switch the phy-qcom-qmp-ufs.o Makefile rule to use the $(PHASE_)
prefix so the correct config symbol is selected automatically
for both SPL and U-Boot proper builds.

Reviewed-by: Sumit Garg <[email protected]>
Signed-off-by: Balaji Selvanathan <[email protected]>
---
Changes in v2:
- No changes
---
 drivers/phy/qcom/Kconfig  | 7 +++++++
 drivers/phy/qcom/Makefile | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/qcom/Kconfig b/drivers/phy/qcom/Kconfig
index 49f830abf01..f7c6234678f 100644
--- a/drivers/phy/qcom/Kconfig
+++ b/drivers/phy/qcom/Kconfig
@@ -32,6 +32,13 @@ config PHY_QCOM_QMP_UFS
        help
          Enable this to support the UFS QMP PHY on various Qualcomm chipsets.
 
+config SPL_PHY_QCOM_QMP_UFS
+       bool "Qualcomm QMP UFS PHY driver in SPL"
+       depends on SPL_PHY && ARCH_SNAPDRAGON
+       help
+         Enable this to support the UFS QMP PHY in SPL on various Qualcomm 
chipsets.
+         This is required for UFS boot support in SPL.
+
 config PHY_QCOM_QUSB2
        tristate "Qualcomm USB QUSB2 PHY driver"
        depends on PHY && ARCH_SNAPDRAGON
diff --git a/drivers/phy/qcom/Makefile b/drivers/phy/qcom/Makefile
index 714013dc572..ec99fab4468 100644
--- a/drivers/phy/qcom/Makefile
+++ b/drivers/phy/qcom/Makefile
@@ -2,7 +2,7 @@ obj-$(CONFIG_PHY_QCOM_IPQ4019_USB) += phy-qcom-ipq4019-usb.o
 obj-$(CONFIG_MSM8916_USB_PHY) += msm8916-usbh-phy.o
 obj-$(CONFIG_PHY_QCOM_QMP_COMBO) += phy-qcom-qmp-combo.o
 obj-$(CONFIG_PHY_QCOM_QMP_PCIE) += phy-qcom-qmp-pcie.o
-obj-$(CONFIG_PHY_QCOM_QMP_UFS) += phy-qcom-qmp-ufs.o
+obj-$(CONFIG_$(PHASE_)PHY_QCOM_QMP_UFS) += phy-qcom-qmp-ufs.o
 obj-$(CONFIG_PHY_QCOM_QUSB2) += phy-qcom-qusb2.o
 obj-$(CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2) += phy-qcom-snps-femto-v2.o
 obj-$(CONFIG_PHY_QCOM_SNPS_EUSB2) += phy-qcom-snps-eusb2.o

-- 
2.34.1

Reply via email to