summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufs-qcom.c
diff options
context:
space:
mode:
authorCan Guo <cang@codeaurora.org>2020-11-26 03:01:01 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-12-01 06:14:16 +0100
commit96f08cc5943c0fe943ea10fdead6a80b73270046 (patch)
tree85a0e8da24f73bbcc466f70291783ac9dddd64d5 /drivers/scsi/ufs/ufs-qcom.c
parentscsi: ufs: Refactor ufshcd_setup_clocks() to remove skip_ref_clk (diff)
downloadlinux-96f08cc5943c0fe943ea10fdead6a80b73270046.tar.xz
linux-96f08cc5943c0fe943ea10fdead6a80b73270046.zip
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>
Diffstat (limited to 'drivers/scsi/ufs/ufs-qcom.c')
-rw-r--r--drivers/scsi/ufs/ufs-qcom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 1e434cce0f79..2206b1e4b774 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -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;