[PATCH v2 8/9] ufs: Handle UFS 3.1 controllers

Neha Malcom Francis n-francis at ti.com
Thu Nov 23 05:48:37 CET 2023


Hi Bin

On 11/10/23 18:45, Bin Meng wrote:
> 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 at tinylab.org>
> ---
> 
> (no changes since v1)
> 
>   drivers/ufs/ufs.c | 3 ++-
>   drivers/ufs/ufs.h | 1 +
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
> index fb2a607ef1..6287ce91a3 100644
> --- a/drivers/ufs/ufs.c
> +++ b/drivers/ufs/ufs.c
> @@ -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);
>   
> diff --git a/drivers/ufs/ufs.h b/drivers/ufs/ufs.h
> index 9daaf03d22..816a5ce0ca 100644
> --- a/drivers/ufs/ufs.h
> +++ b/drivers/ufs/ufs.h
> @@ -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 */

Reviewed-by: Neha Malcom Francis <n-francis at ti.com>

-- 
Thanking You
Neha Malcom Francis


More information about the U-Boot mailing list