mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maulik Shah <maulik.shah@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Mark Brown <broonie@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] soc: qcom: rpmh-rsc: Update CMD_MSGID_LEN to 4 bytes for read request
Date: Fri, 11 Sep 2026 10:23:22 +0530	[thread overview]
Message-ID: <f9a80dee-57ad-4854-b1a0-7d0891bfbf63@oss.qualcomm.com> (raw)
In-Reply-To: <2d411e9c-709f-401d-9c94-3ed6a01fae35@oss.qualcomm.com>


On 10-09-2026 14:31, Konrad Dybcio wrote:
> On 9/10/26 10:53 AM, Maulik Shah wrote:
>> Newer SoC like hawi with RSC version v4.5 support 4 byte message read
>> request instead of default 8 byte on older SoCs. The write request
>> continues to be 8 bytes.
>>
>> Update the read request message accordingly on RSC v4.5 and higher.
>>
>> Signed-off-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
>> ---
>>  drivers/soc/qcom/rpmh-rsc.c | 13 ++++++++++---
>>  1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
>> index c4542318eac4..f84a399fa5dc 100644
>> --- a/drivers/soc/qcom/rpmh-rsc.c
>> +++ b/drivers/soc/qcom/rpmh-rsc.c
>> @@ -86,6 +86,7 @@ enum {
>>  #define TCS_AMC_MODE_TRIGGER		BIT(24)
>>  
>>  /* TCS CMD register bit mask */
>> +#define CMD_MSGID_LEN_READ_v4_5		4
>>  #define CMD_MSGID_LEN			8
>>  #define CMD_MSGID_RESP_REQ		BIT(8)
>>  #define CMD_MSGID_WRITE			BIT(16)
>> @@ -499,15 +500,21 @@ static void __tcs_buffer_write(struct rsc_drv *drv, int tcs_id, int cmd_id,
>>  			       const struct tcs_request *msg)
>>  {
>>  	u32 msgid;
>> -	u32 cmd_msgid = CMD_MSGID_LEN;
>> +	u32 cmd_msgid = 0;
>>  	u32 cmd_enable = 0;
>>  	struct tcs_cmd *cmd;
>>  	int i, j;
>>  
>>  	/* Convert all commands to RR when the request has wait_for_compl set */
>>  	cmd_msgid |= msg->wait_for_compl ? CMD_MSGID_RESP_REQ : 0;
>> -	if (!msg->is_read)
>> -		cmd_msgid |= CMD_MSGID_WRITE;
>> +	if (!msg->is_read) {
> checking for the negative first is odd.. it's existing art, but
> let's invert that for readability

Ack. will update in v2.

>
>> +		cmd_msgid = CMD_MSGID_LEN | CMD_MSGID_WRITE;
>> +	} else {
>> +		if (drv->ver.major >= 4 && drv->ver.minor >= 5)
> This check will fail for e.g. v5.0
>
> (major == 4 && minor >= 5) || major >= 5
>
> Konrad

Ack. will update in v2.

Thanks,
Maulik





  reply	other threads:[~2026-09-11  4:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  8:53 [PATCH 0/2] soc: qcom: rpmh-rsc: Updates for RPMh read requests Maulik Shah
2026-09-10  8:53 ` [PATCH 1/2] soc: qcom: rpmh-rsc: Update CMD_MSGID_LEN to 4 bytes for read request Maulik Shah
2026-09-10  9:01   ` Konrad Dybcio
2026-09-11  4:53     ` Maulik Shah [this message]
2026-09-10 11:59   ` Mukesh Ojha
2026-09-10 13:51   ` Bjorn Andersson
2026-09-11  8:14     ` Maulik Shah
2026-09-10  8:53 ` [PATCH 2/2] soc: qcom: rpmh-rsc: Skip read requests on unsupported platforms Maulik Shah
2026-09-10  9:14   ` Konrad Dybcio

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=f9a80dee-57ad-4854-b1a0-7d0891bfbf63@oss.qualcomm.com \
    --to=maulik.shah@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®