* [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active
[not found] <1606202906-14485-1-git-send-email-cang@codeaurora.org>
@ 2020-11-24 7:28 ` Can Guo
2020-11-25 2:02 ` hongwus
0 siblings, 1 reply; 2+ messages in thread
From: Can Guo @ 2020-11-24 7:28 UTC (permalink / raw)
To: asutoshd, nguyenb, hongwus, ziqichen, rnayak, linux-scsi,
kernel-team, saravanak, salyzyn, cang
Cc: Andy Gross, Bjorn Andersson, Alim Akhtar, Avri Altman,
James E.J. Bottomley, Martin K. Petersen,
open list:ARM/QUALCOMM SUPPORT, open list
If we want to disable clocks to save power but still keep the link active,
core_clk_unipro, as same as ref_clk, should not be the one being disabled.
Signed-off-by: Can Guo <cang@codeaurora.org>
---
drivers/scsi/ufs/ufs-qcom.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index f9d6ef3..70df357 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -977,6 +977,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;
@@ -1075,6 +1076,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->always_on_while_link_active = true;
+ }
+
err = ufs_qcom_init_lane_clks(host);
if (err)
goto out_variant_clear;
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active
2020-11-24 7:28 ` [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active Can Guo
@ 2020-11-25 2:02 ` hongwus
0 siblings, 0 replies; 2+ messages in thread
From: hongwus @ 2020-11-25 2:02 UTC (permalink / raw)
To: Can Guo
Cc: asutoshd, nguyenb, ziqichen, rnayak, linux-scsi, kernel-team,
saravanak, salyzyn, Andy Gross, Bjorn Andersson, Alim Akhtar,
Avri Altman, James E.J. Bottomley, Martin K. Petersen,
linux-arm-msm, linux-kernel
On 2020-11-24 15:28, Can Guo wrote:
> If we want to disable clocks to save power but still keep the link
> active,
> core_clk_unipro, as same as ref_clk, should not be the one being
> disabled.
>
> Signed-off-by: Can Guo <cang@codeaurora.org>
> ---
> drivers/scsi/ufs/ufs-qcom.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index f9d6ef3..70df357 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -977,6 +977,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;
> @@ -1075,6 +1076,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->always_on_while_link_active = true;
> + }
> +
> err = ufs_qcom_init_lane_clks(host);
> if (err)
> goto out_variant_clear;
Reviewed-by: Hongwu Su<hongwus@codeaurora.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-25 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1606202906-14485-1-git-send-email-cang@codeaurora.org>
2020-11-24 7:28 ` [PATCH v2 2/2] scsi: ufs-qcom: Keep core_clk_unipro ON while link is active Can Guo
2020-11-25 2:02 ` hongwus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).