From: Mukesh Ojha <quic_mojha@quicinc.com>
To: <agross@kernel.org>, <andersson@kernel.org>,
<konrad.dybcio@linaro.org>, <linus.walleij@linaro.org>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-gpio@vger.kernel.org>,
Mukesh Ojha <quic_mojha@quicinc.com>,
Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Subject: [PATCH v6 3/5] firmware: scm: Modify only the download bits in TCSR register
Date: Wed, 29 Mar 2023 13:16:50 +0530 [thread overview]
Message-ID: <1680076012-10785-4-git-send-email-quic_mojha@quicinc.com> (raw)
In-Reply-To: <1680076012-10785-1-git-send-email-quic_mojha@quicinc.com>
CrashDump collection is based on the DLOAD bit of TCSR register.
To retain other bits, we read the register and modify only the
DLOAD bit as the other bits have their own significance.
Signed-off-by: Poovendhan Selvaraj <quic_poovendh@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
---
drivers/firmware/qcom_scm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index cb0bc32..8e39b97 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -30,6 +30,9 @@ module_param(download_mode, bool, 0);
#define SCM_HAS_IFACE_CLK BIT(1)
#define SCM_HAS_BUS_CLK BIT(2)
+#define QCOM_DOWNLOAD_MODE_MASK 0x30
+#define QCOM_DOWNLOAD_FULLDUMP 0x1
+
struct qcom_scm {
struct device *dev;
struct clk *core_clk;
@@ -448,8 +451,9 @@ static void qcom_scm_set_download_mode(bool enable)
if (avail) {
ret = __qcom_scm_set_dload_mode(__scm->dev, enable);
} else if (__scm->dload_mode_addr) {
- ret = qcom_scm_io_writel(__scm->dload_mode_addr,
- enable ? QCOM_SCM_BOOT_SET_DLOAD_MODE : 0);
+ ret = qcom_scm_io_update_field(__scm->dload_mode_addr,
+ QCOM_DOWNLOAD_MODE_MASK,
+ enable ? QCOM_DOWNLOAD_FULLDUMP : 0);
} else {
dev_err(__scm->dev,
"No available mechanism for setting download mode\n");
--
2.7.4
next prev parent reply other threads:[~2023-03-29 7:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 7:46 [PATCH v6 0/5] Refactor to support multiple download mode Mukesh Ojha
2023-03-29 7:46 ` [PATCH v6 1/5] firmware: qcom_scm: provide a read-modify-write function Mukesh Ojha
2023-05-26 22:00 ` andy.shevchenko
2023-03-29 7:46 ` [PATCH v6 2/5] pinctrl: qcom: Use qcom_scm_io_update_field() Mukesh Ojha
2023-05-26 22:02 ` andy.shevchenko
2023-03-29 7:46 ` Mukesh Ojha [this message]
2023-05-26 20:17 ` [PATCH v6 3/5] firmware: scm: Modify only the download bits in TCSR register Bjorn Andersson
2023-03-29 7:46 ` [PATCH v6 4/5] firmware: qcom_scm: Refactor code to support multiple download mode Mukesh Ojha
2023-05-26 22:08 ` andy.shevchenko
2023-06-26 16:27 ` Mukesh Ojha
2023-06-26 17:12 ` Andy Shevchenko
2023-03-29 7:46 ` [PATCH v6 5/5] firmware: qcom_scm: Add multiple download mode support Mukesh Ojha
2023-05-26 22:14 ` andy.shevchenko
2023-05-26 23:36 ` Bjorn Andersson
2023-05-27 7:22 ` Andy Shevchenko
2023-04-10 14:34 ` [PATCH v6 0/5] Refactor to support multiple download mode Mukesh Ojha
2023-05-26 22:15 ` andy.shevchenko
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=1680076012-10785-4-git-send-email-quic_mojha@quicinc.com \
--to=quic_mojha@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_poovendh@quicinc.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).