All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: "Barnabás Czémán" <barnabas.czeman@mainlining.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/8] remoteproc: qcom_q6v5_mss: Add MSM8937
Date: Mon, 29 Dec 2025 12:13:37 +0100	[thread overview]
Message-ID: <aVJiYSbpmHMGJarA@linaro.org> (raw)
In-Reply-To: <20251228-mss-v1-6-aeb36b1f7a3f@mainlining.org>

On Sun, Dec 28, 2025 at 03:21:56PM +0100, Barnabás Czémán wrote:
> Add support for MSM8937 MSS it similar to MSM8917 MSS.
> It differs primarily in that TZ needs to be informed of
> the modem start address and pas_id.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  drivers/remoteproc/qcom_q6v5_mss.c | 49 +++++++++++++++++++++++++++++++++++---
>  1 file changed, 46 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index 2579558fb567..2ffcea7dbc79 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -261,6 +261,7 @@ enum {
>  	MSS_MSM8916,
>  	MSS_MSM8917,
>  	MSS_MSM8926,
> +	MSS_MSM8937,
>  	MSS_MSM8953,
>  	MSS_MSM8974,
>  	MSS_MSM8996,
> @@ -751,6 +752,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  	} else if (qproc->version == MSS_MDM9607 ||
>  		   qproc->version == MSS_MSM8909 ||
>  		   qproc->version == MSS_MSM8917 ||
> +		   qproc->version == MSS_MSM8937 ||
>  		   qproc->version == MSS_MSM8953 ||
>  		   qproc->version == MSS_MSM8996 ||
>  		   qproc->version == MSS_MSM8998 ||
> @@ -758,7 +760,8 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  
>  		/* Override the ACC value if required */
>  		if (qproc->version == MSS_MDM9607 ||
> -		    qproc->version == MSS_MSM8917)
> +		    qproc->version == MSS_MSM8917 ||
> +		    qproc->version == MSS_MSM8937)
>  			writel(QDSP6SS_ACC_OVERRIDE_VAL_9607,
>  			       qproc->reg_base + QDSP6SS_STRAP_ACC);
>  		else if (qproc->version != MSS_MSM8909 &&
> @@ -821,6 +824,7 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  			/* Turn on L1, L2, ETB and JU memories 1 at a time */
>  			if (qproc->version == MSS_MDM9607 ||
>  			    qproc->version == MSS_MSM8917 ||
> +			    qproc->version == MSS_MSM8937 ||
>  			    qproc->version == MSS_MSM8953 ||
>  			    qproc->version == MSS_MSM8996) {
>  				mem_pwr_ctl = QDSP6SS_MEM_PWR_CTL;
> @@ -831,7 +835,8 @@ static int q6v5proc_reset(struct q6v5 *qproc)
>  				 * "inrush current" issues.
>  				 */
>  				if (qproc->version == MSS_MDM9607 ||
> -				    qproc->version == MSS_MSM8917)
> +				    qproc->version == MSS_MSM8917 ||
> +				    qproc->version == MSS_MSM8937)
>  					reverse = 6;
>  			} else {
>  				/* MSS_MSM8998, MSS_SDM660 */
> @@ -1466,7 +1471,8 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
>  			max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K);
>  	}
>  
> -	if (qproc->version == MSS_MSM8953) {
> +	if (qproc->version == MSS_MSM8937 ||
> +	    qproc->version == MSS_MSM8953) {
>  		ret = qcom_scm_pas_mem_setup(MPSS_PAS_ID, qproc->mpss_phys, qproc->mpss_size);
>  		if (ret) {
>  			dev_err(qproc->dev,

I think for consistency it would be cleaner if this was a flag like
"need_mem_protection" (i.e. something like "need_pas_mem_setup"). Then
you could reuse the actual reset sequence from MSS_MDM9607 similar to
MSM8917.

Thanks,
Stephan

  reply	other threads:[~2025-12-29 11:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 14:21 [PATCH 0/8] MDM9607/MSM8917/MSM8937/MSM8940 MSS Barnabás Czémán
2025-12-28 14:21 ` [PATCH 1/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MDM9607 Barnabás Czémán
2025-12-29 10:58   ` Stephan Gerhold
2025-12-28 14:21 ` [PATCH 2/8] remoteproc: qcom_q6v5_mss: " Barnabás Czémán
2025-12-28 14:21 ` [PATCH 3/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8917 Barnabás Czémán
2025-12-28 14:21 ` [PATCH 4/8] remoteproc: qcom_q6v5_mss: " Barnabás Czémán
2025-12-29 11:08   ` Stephan Gerhold
2025-12-29 12:33     ` barnabas.czeman
2025-12-29 12:40       ` Konrad Dybcio
2025-12-29 12:51         ` barnabas.czeman
2025-12-29 12:59           ` barnabas.czeman
2025-12-29 13:07             ` Konrad Dybcio
2025-12-30  3:25               ` barnabas.czeman
2025-12-30 13:11                 ` Konrad Dybcio
2025-12-30 15:28                   ` barnabas.czeman
2025-12-30 19:50                     ` Konrad Dybcio
2025-12-28 14:21 ` [PATCH 5/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8937 Barnabás Czémán
2025-12-28 14:21 ` [PATCH 6/8] remoteproc: qcom_q6v5_mss: " Barnabás Czémán
2025-12-29 11:13   ` Stephan Gerhold [this message]
2025-12-28 14:21 ` [PATCH 7/8] dt-bindings: remoteproc: qcom,msm8916-mss-pil: Add MSM8940 Barnabás Czémán
2025-12-28 14:21 ` [PATCH 8/8] remoteproc: qcom_q6v5_mss: " Barnabás Czémán

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=aVJiYSbpmHMGJarA@linaro.org \
    --to=stephan.gerhold@linaro.org \
    --cc=andersson@kernel.org \
    --cc=barnabas.czeman@mainlining.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=robh@kernel.org \
    --cc=stephan@gerhold.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.