scsi: ufs-qcom: Keep core_clk_unipro on while link is active

If we want to disable clocks to save power but still keep the link active,
core_clk_unipro, like ref_clk, should not be the one being disabled.

Link: https://lore.kernel.org/r/1606356063-38380-3-git-send-email-cang@codeaurora.org
Reviewed-by: Hongwu Su <hongwus@codeaurora.org>
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Can Guo 2020-11-25 18:01:01 -08:00 committed by Martin K. Petersen
parent 81309c247a
commit 96f08cc594

View File

@ -959,6 +959,7 @@ static int ufs_qcom_init(struct ufs_hba *hba)
struct platform_device *pdev = to_platform_device(dev);
struct ufs_qcom_host *host;
struct resource *res;
struct ufs_clk_info *clki;
if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev)))
return -ENODEV;
@ -1057,6 +1058,11 @@ static int ufs_qcom_init(struct ufs_hba *hba)
}
}
list_for_each_entry(clki, &hba->clk_list_head, list) {
if (!strcmp(clki->name, "core_clk_unipro"))
clki->keep_link_active = true;
}
err = ufs_qcom_init_lane_clks(host);
if (err)
goto out_variant_clear;