diff mbox series

[3/4] ufs: allow UFSHCI version 4.0

Message ID 20240910-topic-ufs-qcom-controller-v1-3-54c0d2231b10@linaro.org
State New
Headers show
Series ufs: add support for Qualcomm UFS Controller | expand

Commit Message

Neil Armstrong Sept. 10, 2024, 9:50 a.m. UTC
Add UFSHCI version 4.0 found on the recent Qualcomm UFS Controllers.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
 drivers/ufs/ufs.c | 3 ++-
 drivers/ufs/ufs.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 1edd31677b2..f7d8c40c448 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -1974,7 +1974,8 @@  int ufshcd_probe(struct udevice *ufs_dev, struct ufs_hba_ops *hba_ops)
 	    hba->version != UFSHCI_VERSION_20 &&
 	    hba->version != UFSHCI_VERSION_21 &&
 	    hba->version != UFSHCI_VERSION_30 &&
-	    hba->version != UFSHCI_VERSION_31)
+	    hba->version != UFSHCI_VERSION_31 &&
+	    hba->version != UFSHCI_VERSION_40)
 		dev_err(hba->dev, "invalid UFS version 0x%x\n",
 			hba->version);
 
diff --git a/drivers/ufs/ufs.h b/drivers/ufs/ufs.h
index fb47d0cd3a4..2ab593455e9 100644
--- a/drivers/ufs/ufs.h
+++ b/drivers/ufs/ufs.h
@@ -906,6 +906,7 @@  enum {
 	UFSHCI_VERSION_21 = 0x00000210, /* 2.1 */
 	UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */
 	UFSHCI_VERSION_31 = 0x00000310, /* 3.1 */
+	UFSHCI_VERSION_40 = 0x00000400, /* 4.0 */
 };
 
 /* Interrupt disable masks */