scsi: ufs-qcom: enable UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION
Newer revisions of Qualcomm UFS host controller may not advertise the correct version information in UFS HCI VER register. To handle this, enable UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION to let UFS standard host controller driver call into vendor specific operation to get right UFS HCI VER register value. Change-Id: Ibd50b8bb8a87003181ea306690e87728576d49fb Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
This commit is contained in:
parent
e77d1e1a1d
commit
ddc6e01269
1 changed files with 12 additions and 0 deletions
|
@ -958,6 +958,16 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static u32 ufs_qcom_get_ufs_hci_version(struct ufs_hba *hba)
|
||||||
|
{
|
||||||
|
struct ufs_qcom_host *host = hba->priv;
|
||||||
|
|
||||||
|
if (host->hw_ver.major == 0x1)
|
||||||
|
return UFSHCI_VERSION_11;
|
||||||
|
else
|
||||||
|
return UFSHCI_VERSION_20;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ufs_qcom_advertise_quirks - advertise the known QCOM UFS controller quirks
|
* ufs_qcom_advertise_quirks - advertise the known QCOM UFS controller quirks
|
||||||
* @hba: host controller instance
|
* @hba: host controller instance
|
||||||
|
@ -982,6 +992,7 @@ static void ufs_qcom_advertise_quirks(struct ufs_hba *hba)
|
||||||
|
|
||||||
if (host->hw_ver.major >= 0x2) {
|
if (host->hw_ver.major >= 0x2) {
|
||||||
hba->quirks |= UFSHCD_QUIRK_BROKEN_LCC;
|
hba->quirks |= UFSHCD_QUIRK_BROKEN_LCC;
|
||||||
|
hba->quirks |= UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION;
|
||||||
|
|
||||||
if (!ufs_qcom_cap_qunipro(host))
|
if (!ufs_qcom_cap_qunipro(host))
|
||||||
/* Legacy UniPro mode still need following quirks */
|
/* Legacy UniPro mode still need following quirks */
|
||||||
|
@ -1642,6 +1653,7 @@ const struct ufs_hba_variant_ops ufs_hba_qcom_vops = {
|
||||||
.name = "qcom",
|
.name = "qcom",
|
||||||
.init = ufs_qcom_init,
|
.init = ufs_qcom_init,
|
||||||
.exit = ufs_qcom_exit,
|
.exit = ufs_qcom_exit,
|
||||||
|
.get_ufs_hci_version = ufs_qcom_get_ufs_hci_version,
|
||||||
.clk_scale_notify = ufs_qcom_clk_scale_notify,
|
.clk_scale_notify = ufs_qcom_clk_scale_notify,
|
||||||
.setup_clocks = ufs_qcom_setup_clocks,
|
.setup_clocks = ufs_qcom_setup_clocks,
|
||||||
.hce_enable_notify = ufs_qcom_hce_enable_notify,
|
.hce_enable_notify = ufs_qcom_hce_enable_notify,
|
||||||
|
|
Loading…
Add table
Reference in a new issue