mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
scsi: ufs: Fix CBB errors
UFS virtualization registers are accessed without taking controller out of reset. Bug 4161857 Change-Id: I6860eb2011fc6be5ffe9dba91ed94a8a749a4add Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2970936 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f62619388d
commit
7939750e65
@@ -1517,23 +1517,6 @@ static int ufs_tegra_init(struct ufs_hba *hba)
|
||||
if (err)
|
||||
goto out_host_free;
|
||||
|
||||
if (ufs_tegra->soc->chip_id == TEGRA234) {
|
||||
fwspec = dev_iommu_fwspec_get(dev);
|
||||
if (fwspec == NULL) {
|
||||
err = -ENODEV;
|
||||
dev_err(dev, "Failed to get MC streamidd\n");
|
||||
goto out;
|
||||
} else {
|
||||
ufs_tegra->streamid = fwspec->ids[0] & 0xffff;
|
||||
writel(UFS_AUX_ADDR_VIRT_CTRL_EN,
|
||||
ufs_tegra->ufs_virtualization_base +
|
||||
UFS_AUX_ADDR_VIRT_CTRL_0);
|
||||
writel(ufs_tegra->streamid,
|
||||
ufs_tegra->ufs_virtualization_base +
|
||||
UFS_AUX_ADDR_VIRT_REG_0);
|
||||
}
|
||||
}
|
||||
|
||||
err = ufs_tegra_enable_mphylane_clks(ufs_tegra);
|
||||
if (err)
|
||||
goto out_disable_ufs_clks;
|
||||
@@ -1556,6 +1539,23 @@ static int ufs_tegra_init(struct ufs_hba *hba)
|
||||
ufs_tegra_set_clk_div(hba, UFS_VNDR_HCLKDIV_1US_TICK);
|
||||
ufs_tegra_eq_timeout(ufs_tegra);
|
||||
|
||||
if (ufs_tegra->soc->chip_id == TEGRA234) {
|
||||
fwspec = dev_iommu_fwspec_get(dev);
|
||||
if (fwspec == NULL) {
|
||||
err = -ENODEV;
|
||||
dev_err(dev, "Failed to get MC streamidd\n");
|
||||
goto out_disable_mphylane_clks;
|
||||
} else {
|
||||
ufs_tegra->streamid = fwspec->ids[0] & 0xffff;
|
||||
writel(UFS_AUX_ADDR_VIRT_CTRL_EN,
|
||||
ufs_tegra->ufs_virtualization_base +
|
||||
UFS_AUX_ADDR_VIRT_CTRL_0);
|
||||
writel(ufs_tegra->streamid,
|
||||
ufs_tegra->ufs_virtualization_base +
|
||||
UFS_AUX_ADDR_VIRT_REG_0);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
ufs_tegra_init_debugfs(hba);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user