diff options
author | Can Guo | 2020-11-25 18:01:01 -0800 |
---|---|---|
committer | Martin K. Petersen | 2020-12-01 00:14:16 -0500 |
commit | 96f08cc5943c0fe943ea10fdead6a80b73270046 (patch) | |
tree | 85a0e8da24f73bbcc466f70291783ac9dddd64d5 /drivers | |
parent | 81309c247a4dcd597cbda5254fd0afdd61b93f14 (diff) |
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')
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.c | 6 |
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; |