]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ufs: Handle UFS 3.0 controllers
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 16 Aug 2023 15:05:52 +0000 (17:05 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 24 Aug 2023 17:47:43 +0000 (13:47 -0400)
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>
drivers/ufs/ufs.c
drivers/ufs/ufs.h

index 261ae2843c2b3caa6aacb4d52f1faab654ea50dd..58830c8ddcacd1226a74364a3e3f704ea0643ddc 100644 (file)
@@ -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);
 
index 638c10b5503ed22a97cdc309b8f15982948bfa30..9daaf03d222bef46b42d58c87868494203db26f4 100644 (file)
@@ -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 */