public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: asutoshd@codeaurora.org
To: Can Guo <cang@codeaurora.org>
Cc: nguyenb@codeaurora.org, hongwus@codeaurora.org,
	rnayak@codeaurora.org, linux-scsi@vger.kernel.org,
	kernel-team@android.com, saravanak@google.com,
	salyzyn@google.com, 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>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Pedro Sousa <sousa@synopsys.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-scsi-owner@vger.kernel.org
Subject: Re: [PATCH v1 2/2] scsi: ufs: Select INITIAL ADAPT type for HS Gear4
Date: Wed, 12 Feb 2020 09:04:31 -0800	[thread overview]
Message-ID: <ac3f68fa7f0dd3de567cc321eb5c5026@codeaurora.org> (raw)
In-Reply-To: <1581485910-8307-3-git-send-email-cang@codeaurora.org>

On 2020-02-11 21:38, Can Guo wrote:
> ADAPT is added specifically for HS Gear4 mode only, select INITIAL 
> ADAPT
> before do power mode change to G4 and select NO ADAPT before switch to
> non-G4 modes.
> 
> Signed-off-by: Can Guo <cang@codeaurora.org>
> ---

Reviewed-by:  Asutosh Das <asutoshd@codeaurora.org>

>  drivers/scsi/ufs/ufs-qcom.c | 14 ++++++++++++++
>  drivers/scsi/ufs/unipro.h   |  7 +++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index d593523..6a905bb 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -942,6 +942,20 @@ static int ufs_qcom_pwr_change_notify(struct 
> ufs_hba *hba,
>  		if (!ufshcd_is_hs_mode(&hba->pwr_info) &&
>  			ufshcd_is_hs_mode(dev_req_params))
>  			ufs_qcom_dev_ref_clk_ctrl(host, true);
> +
> +		if (host->hw_ver.major >= 0x4) {
> +			if (dev_req_params->gear_tx == UFS_HS_G4) {
> +				/* INITIAL ADAPT */
> +				ufshcd_dme_set(hba,
> +					       UIC_ARG_MIB(PA_TXHSADAPTTYPE),
> +					       PA_INITIAL_ADAPT);
> +			} else {
> +				/* NO ADAPT */
> +				ufshcd_dme_set(hba,
> +					       UIC_ARG_MIB(PA_TXHSADAPTTYPE),
> +					       PA_NO_ADAPT);
> +			}
> +		}
>  		break;
>  	case POST_CHANGE:
>  		if (ufs_qcom_cfg_timers(hba, dev_req_params->gear_rx,
> diff --git a/drivers/scsi/ufs/unipro.h b/drivers/scsi/ufs/unipro.h
> index 3dc4d8b..766d551 100644
> --- a/drivers/scsi/ufs/unipro.h
> +++ b/drivers/scsi/ufs/unipro.h
> @@ -146,6 +146,12 @@
>  #define PA_SLEEPNOCONFIGTIME	0x15A2
>  #define PA_STALLNOCONFIGTIME	0x15A3
>  #define PA_SAVECONFIGTIME	0x15A4
> +#define PA_TXHSADAPTTYPE       0x15D4
> +
> +/* Adpat type for PA_TXHSADAPTTYPE attribute */
> +#define PA_REFRESH_ADAPT       0x00
> +#define PA_INITIAL_ADAPT       0x01
> +#define PA_NO_ADAPT            0x03
> 
>  #define PA_TACTIVATE_TIME_UNIT_US	10
>  #define PA_HIBERN8_TIME_UNIT_US		100
> @@ -203,6 +209,7 @@ enum ufs_hs_gear_tag {
>  	UFS_HS_G1,		/* HS Gear 1 (default for reset) */
>  	UFS_HS_G2,		/* HS Gear 2 */
>  	UFS_HS_G3,		/* HS Gear 3 */
> +	UFS_HS_G4,		/* HS Gear 4 */
>  };
> 
>  enum ufs_unipro_ver {

  parent reply	other threads:[~2020-02-12 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12  5:38 [PATCH v1 0/2] Select ADAPT type when do gear scaling Can Guo
2020-02-12  5:38 ` [PATCH v1 1/2] scsi: ufs: Use ufshcd_config_pwr_mode() when scale gear Can Guo
2020-02-12 12:21   ` Avri Altman
2020-02-13  2:53     ` Can Guo
2020-02-13  7:20       ` Avri Altman
2020-02-13  7:54   ` Stanley Chu
2020-02-12  5:38 ` [PATCH v1 2/2] scsi: ufs: Select INITIAL ADAPT type for HS Gear4 Can Guo
2020-02-12 12:26   ` Avri Altman
2020-02-12 17:04   ` asutoshd [this message]
2020-02-13  0:36   ` Martin K. Petersen

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=ac3f68fa7f0dd3de567cc321eb5c5026@codeaurora.org \
    --to=asutoshd@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=cang@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hongwus@codeaurora.org \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-team@android.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nguyenb@codeaurora.org \
    --cc=rnayak@codeaurora.org \
    --cc=salyzyn@google.com \
    --cc=saravanak@google.com \
    --cc=sousa@synopsys.com \
    --cc=tglx@linutronix.de \
    /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