summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2023-08-16 17:05:52 +0200
committerTom Rini <trini@konsulko.com>2023-08-24 13:47:43 -0400
commit2ff810ae5e823ba42c7b543b06d87e3dd7d1cb81 (patch)
treed1fab7bcc2e49d4f5635e32cc51a794a4f23cc7a
parentf430151e105b055abd687a456c3980b3674eeb42 (diff)
downloadu-boot-2ff810ae5e823ba42c7b543b06d87e3dd7d1cb81.tar.gz
u-boot-2ff810ae5e823ba42c7b543b06d87e3dd7d1cb81.tar.bz2
u-boot-2ff810ae5e823ba42c7b543b06d87e3dd7d1cb81.zip
ufs: Handle UFS 3.0 controllers
Extend the version check to handle UFS 3.0 controllers as well. Tested on R-Car S4 UFS 3.0 controller. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Bhupesh Sharma <bhupesh.sharma@linaro.org> Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
-rw-r--r--drivers/ufs/ufs.c3
-rw-r--r--drivers/ufs/ufs.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 261ae2843c..58830c8ddc 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -1903,7 +1903,8 @@ int ufshcd_probe(struct udevice *ufs_dev, struct ufs_hba_ops *hba_ops)
if (hba->version != UFSHCI_VERSION_10 &&
hba->version != UFSHCI_VERSION_11 &&
hba->version != UFSHCI_VERSION_20 &&
- hba->version != UFSHCI_VERSION_21)
+ hba->version != UFSHCI_VERSION_21 &&
+ hba->version != UFSHCI_VERSION_30)
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 638c10b550..9daaf03d22 100644
--- a/drivers/ufs/ufs.h
+++ b/drivers/ufs/ufs.h
@@ -781,6 +781,7 @@ enum {
UFSHCI_VERSION_11 = 0x00010100, /* 1.1 */
UFSHCI_VERSION_20 = 0x00000200, /* 2.0 */
UFSHCI_VERSION_21 = 0x00000210, /* 2.1 */
+ UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */
};
/* Interrupt disable masks */