linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Bao D. Nguyen'" <nguyenb@codeaurora.org>, <cang@codeaurora.org>,
	<asutoshd@codeaurora.org>, <martin.petersen@oracle.com>,
	<linux-scsi@vger.kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>,
	"'Andy Gross'" <agross@kernel.org>,
	"'Bjorn Andersson'" <bjorn.andersson@linaro.org>,
	"'Avri Altman'" <avri.altman@wdc.com>,
	"'James E.J. Bottomley'" <jejb@linux.ibm.com>,
	"'open list'" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during clock scaling
Date: Wed, 29 Sep 2021 08:46:04 +0530	[thread overview]
Message-ID: <00f901d7b4e0$581ae2f0$0850a8d0$@samsung.com> (raw)
In-Reply-To: <212b7aaf6d834c4a8c682fdac4a59b84013ed573.1632818942.git.nguyenb@codeaurora.org>

Hello,

>-----Original Message-----
>From: nguyenb=codeaurora.org@mg.codeaurora.org
>[mailto:nguyenb=codeaurora.org@mg.codeaurora.org] On Behalf Of Bao D.
>Nguyen
>Sent: Tuesday, September 28, 2021 2:36 PM
>To: cang@codeaurora.org; asutoshd@codeaurora.org;
>martin.petersen@oracle.com; linux-scsi@vger.kernel.org
>Cc: linux-arm-msm@vger.kernel.org; Bao D . Nguyen
><nguyenb@codeaurora.org>; Andy Gross <agross@kernel.org>; Bjorn Andersson
><bjorn.andersson@linaro.org>; Alim Akhtar <alim.akhtar@samsung.com>; Avri
>Altman <avri.altman@wdc.com>; James E.J. Bottomley <jejb@linux.ibm.com>;
>open list <linux-kernel@vger.kernel.org>
>Subject: [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during clock
scaling
>
>From: Asutosh Das <asutoshd@codeaurora.org>
>
>Qualcomm controller needs to be in hibern8 before scaling clocks.
>This change puts the controller in hibern8 state before scaling and brings
it out
>after scaling of clocks.
>
>Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
>Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
>---

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

> drivers/scsi/ufs/ufs-qcom.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index
>92d4c61..92f5bb4 100644
>--- a/drivers/scsi/ufs/ufs-qcom.c
>+++ b/drivers/scsi/ufs/ufs-qcom.c
>@@ -1212,24 +1212,34 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba
>*hba,
> 	int err = 0;
>
> 	if (status == PRE_CHANGE) {
>+		err = ufshcd_uic_hibern8_enter(hba);
>+		if (err)
>+			return err;
> 		if (scale_up)
> 			err = ufs_qcom_clk_scale_up_pre_change(hba);
> 		else
> 			err = ufs_qcom_clk_scale_down_pre_change(hba);
>+		if (err)
>+			ufshcd_uic_hibern8_exit(hba);
>+
> 	} else {
> 		if (scale_up)
> 			err = ufs_qcom_clk_scale_up_post_change(hba);
> 		else
> 			err = ufs_qcom_clk_scale_down_post_change(hba);
>
>-		if (err || !dev_req_params)
>+
>+		if (err || !dev_req_params) {
>+			ufshcd_uic_hibern8_exit(hba);
> 			goto out;
>+		}
>
> 		ufs_qcom_cfg_timers(hba,
> 				    dev_req_params->gear_rx,
> 				    dev_req_params->pwr_rx,
> 				    dev_req_params->hs_rate,
> 				    false);
>+		ufshcd_uic_hibern8_exit(hba);
> 	}
>
> out:
>--
>The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a
>Linux Foundation Collaborative Project



  reply	other threads:[~2021-09-29  3:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1632818942.git.nguyenb@codeaurora.org>
2021-09-28  9:06 ` [PATCH v2 1/2] scsi: ufs: export hibern8 entry and exit Bao D. Nguyen
2021-09-28 22:28   ` Bart Van Assche
2021-09-29  3:13   ` Alim Akhtar
2021-09-28  9:06 ` [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during clock scaling Bao D. Nguyen
2021-09-29  3:16   ` Alim Akhtar [this message]
2019-10-23 16:39 [PATCH v2 1/2] scsi: ufs: export hibern8 entry and exit Asutosh Das
2019-10-23 16:39 ` [PATCH v2 2/2] scsi: ufs-qcom: enter and exit hibern8 during clock scaling Asutosh Das
2019-10-23 16:47   ` asutoshd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00f901d7b4e0$581ae2f0$0850a8d0$@samsung.com' \
    --to=alim.akhtar@samsung.com \
    --cc=agross@kernel.org \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=cang@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nguyenb@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).