]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ufs: Handle UFS 3.1 controllers
authorBin Meng <bmeng@tinylab.org>
Wed, 11 Oct 2023 13:15:51 +0000 (21:15 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 27 Nov 2023 21:18:59 +0000 (16:18 -0500)
Extend the version check to handle UFS 3.1 controllers as well.
Tested on QEMU emulated UFS 3.1 controller.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/ufs/ufs.c
drivers/ufs/ufs.h

index fb2a607ef11744c6a8258411e69973d559f14a66..6287ce91a3ea4fe5ccf88446fcea375c60bb6220 100644 (file)
@@ -1953,7 +1953,8 @@ int ufshcd_probe(struct udevice *ufs_dev, struct ufs_hba_ops *hba_ops)
            hba->version != UFSHCI_VERSION_11 &&
            hba->version != UFSHCI_VERSION_20 &&
            hba->version != UFSHCI_VERSION_21 &&
-           hba->version != UFSHCI_VERSION_30)
+           hba->version != UFSHCI_VERSION_30 &&
+           hba->version != UFSHCI_VERSION_31)
                dev_err(hba->dev, "invalid UFS version 0x%x\n",
                        hba->version);
 
index 9daaf03d222bef46b42d58c87868494203db26f4..816a5ce0cafc5f87a5ea1e864b6cac97789feddf 100644 (file)
@@ -782,6 +782,7 @@ enum {
        UFSHCI_VERSION_20 = 0x00000200, /* 2.0 */
        UFSHCI_VERSION_21 = 0x00000210, /* 2.1 */
        UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */
+       UFSHCI_VERSION_31 = 0x00000310, /* 3.1 */
 };
 
 /* Interrupt disable masks */