[PATCH 3/6] ufs: Handle UFS 3.0 controllers
Bhupesh Sharma
bhupesh.sharma at linaro.org
Tue Aug 15 19:14:34 CEST 2023
On Mon, 14 Aug 2023 at 05:23, Marek Vasut
<marek.vasut+renesas at mailbox.org> wrote:
>
> 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 at mailbox.org>
> ---
> Cc: Faiz Abbas <faiz_abbas at ti.com>
> ---
> 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 261ae2843c2..58830c8ddca 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 33ca5f29812..ef7728fc39e 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 */
> --
> 2.40.1
SInce the Qualcomm UFS HC controllers are even newer / greater version
values, we can drop this patch in favour of my UFS patch here:
https://lists.denx.de/pipermail/u-boot/2023-August/527215.html
Thanks,
Bhupesh
More information about the U-Boot
mailing list