From: Asutosh Das <asutoshd@codeaurora.org>
To: cang@codeaurora.org, martin.petersen@oracle.com,
Avri.Altman@wdc.com, linux-scsi@vger.kernel.org
Cc: Asutosh Das <asutoshd@codeaurora.org>,
linux-arm-msm@vger.kernel.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>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v1 2/3] ufs-qcom: scsi: configure write booster type
Date: Wed, 8 Apr 2020 14:48:40 -0700 [thread overview]
Message-ID: <70ac879265780c0f68a18c4539c7bc9a838d93f6.1586382357.git.asutoshd@codeaurora.org> (raw)
In-Reply-To: <cover.1586374414.git.asutoshd@codeaurora.org>
In-Reply-To: <3c186284280c37c76cf77bf482dde725359b8a8a.1586382357.git.asutoshd@codeaurora.org>
Configure the WriteBooster type to preserve user-space mode.
This would ensure that no user-space capacity is reduced
when write booster is enabled.
Enable WB for Qualcomm platform.
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
---
drivers/scsi/ufs/ufs-qcom.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 19aa5c4..def1e09 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -1071,6 +1071,7 @@ static void ufs_qcom_set_caps(struct ufs_hba *hba)
hba->caps |= UFSHCD_CAP_CLK_GATING | UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
hba->caps |= UFSHCD_CAP_CLK_SCALING;
hba->caps |= UFSHCD_CAP_AUTO_BKOPS_SUSPEND;
+ hba->caps |= UFSHCD_CAP_WB_EN;
if (host->hw_ver.major >= 0x2) {
host->caps = UFS_QCOM_CAP_QUNIPRO |
@@ -1713,6 +1714,12 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
}
#endif
+static u32 ufs_qcom_wb_get_user_cap_mode(struct ufs_hba *hba)
+{
+ /* QCom prefers no user-space reduction mode */
+ return UFS_WB_BUFF_PRESERVE_USER_SPACE;
+}
+
/**
* struct ufs_hba_qcom_vops - UFS QCOM specific variant operations
*
@@ -1735,6 +1742,7 @@ static const struct ufs_hba_variant_ops ufs_hba_qcom_vops = {
.dbg_register_dump = ufs_qcom_dump_dbg_regs,
.device_reset = ufs_qcom_device_reset,
.config_scaling_param = ufs_qcom_config_scaling_param,
+ .wb_get_user_cap_mode = ufs_qcom_wb_get_user_cap_mode,
};
/**
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2020-04-08 21:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 21:48 [PATCH v1 0/3] WriteBooster Feature Support Asutosh Das
2020-04-08 21:48 ` [PATCH v1 1/3] scsi: ufs: add write booster feature support Asutosh Das
2020-04-08 21:48 ` Asutosh Das [this message]
2020-04-08 21:48 ` [PATCH v1 3/3] ufs: sysfs: add sysfs entries for write booster Asutosh Das
2020-04-12 12:43 ` [PATCH v1 1/3] scsi: ufs: add write booster feature support Avri Altman
2020-04-21 20:01 ` Asutosh Das (asd)
2020-06-20 21:13 ` Rob Clark
2020-06-21 7:40 ` Avri Altman
2020-06-21 7:55 ` Bjorn Andersson
2020-06-21 16:50 ` Rob Clark
2020-06-21 17:50 ` Steev Klimaszewski
2020-06-23 4:34 ` Kyuho Choi
2020-06-23 6:09 ` Avri Altman
2020-06-23 6:51 ` Kyuho Choi
2020-06-24 1:10 ` Steev Klimaszewski
2020-06-24 1:53 ` Stanley Chu
2020-06-24 2:06 ` Kyuho Choi
2020-06-24 2:49 ` Stanley Chu
2020-06-24 16:15 ` Steev Klimaszewski
2020-06-25 3:29 ` Stanley Chu
2020-06-24 1:54 ` Kyuho Choi
2020-04-21 22:54 ` [PATCH v1 0/3] WriteBooster Feature Support Asutosh Das
2020-04-21 22:54 ` [PATCH v2 1/3] scsi: ufs: add write booster feature support Asutosh Das
2020-04-21 22:54 ` [PATCH v2 2/3] ufs: sysfs: add sysfs entries for write booster Asutosh Das
2020-04-22 8:49 ` Avri Altman
2020-04-21 22:54 ` [PATCH v2 3/3] ufs-qcom: scsi: configure write booster type Asutosh Das
2020-04-22 8:51 ` Avri Altman
2020-04-22 10:28 ` [PATCH v2 1/3] scsi: ufs: add write booster feature support Avri Altman
2020-04-22 10:35 ` Avri Altman
2020-04-22 21:41 ` [PATCH v3 0/3] WriteBooster Feature Support Asutosh Das
2020-04-22 21:41 ` [PATCH v3 1/3] scsi: ufs: add write booster feature support Asutosh Das
2020-04-22 21:41 ` [PATCH v3 2/3] ufs: sysfs: add sysfs entries for write booster Asutosh Das
2020-04-22 21:41 ` [PATCH v3 3/3] ufs-qcom: scsi: configure write booster type Asutosh Das
2020-04-23 8:30 ` [PATCH v3 0/3] WriteBooster Feature Support Avri Altman
2020-04-27 22:49 ` [PATCH v1 " 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=70ac879265780c0f68a18c4539c7bc9a838d93f6.1586382357.git.asutoshd@codeaurora.org \
--to=asutoshd@codeaurora.org \
--cc=Avri.Altman@wdc.com \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.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 \
/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).