Commit 96f08cc5 authored by Can Guo's avatar Can Guo Committed by Martin K. Petersen

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.orgReviewed-by: default avatarHongwu Su <hongwus@codeaurora.org>
Reviewed-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 81309c24
...@@ -959,6 +959,7 @@ static int ufs_qcom_init(struct ufs_hba *hba) ...@@ -959,6 +959,7 @@ static int ufs_qcom_init(struct ufs_hba *hba)
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct ufs_qcom_host *host; struct ufs_qcom_host *host;
struct resource *res; struct resource *res;
struct ufs_clk_info *clki;
if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev))) if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev)))
return -ENODEV; return -ENODEV;
...@@ -1057,6 +1058,11 @@ static int ufs_qcom_init(struct ufs_hba *hba) ...@@ -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); err = ufs_qcom_init_lane_clks(host);
if (err) if (err)
goto out_variant_clear; goto out_variant_clear;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment