All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Sibi Sankar <sibis@codeaurora.org>
Cc: agross@kernel.org, linux-arm-msm@vger.kernel.org,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	ohad@wizery.com, evgreen@chromium.org, swboyd@chromium.org
Subject: Re: [PATCH] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA cold boot
Date: Tue, 15 Sep 2020 18:33:47 +0000	[thread overview]
Message-ID: <20200915183347.GJ478@uller> (raw)
In-Reply-To: <20200915173713.28098-1-sibis@codeaurora.org>

On Tue 15 Sep 17:37 UTC 2020, Sibi Sankar wrote:

> On secure devices which support warm reset, the modem subsystem requires
> access to the mpss region to clear them out. Hence assign the mpss region
> to Q6 before MBA cold boot. This will be a nop during a modem SSR.
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
> 
> I didn't want to add any new flags for warm reset support because
> calling xfer for mpss to q6 shouldn't have any side effects on
> platforms that don't support warm resets.
> 

As discussed offline, I don't see a problem with unconditionally handing
over the ownership of the region during this time frame. So let's just
generalize the comment below a little bit and I'm happy with this
change.

Thanks,
Bjorn

>  drivers/remoteproc/qcom_q6v5_mss.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index c401bcc263fa5..cc5b7edc02c73 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -931,6 +931,18 @@ static int q6v5_mba_load(struct q6v5 *qproc)
>  		goto assert_reset;
>  	}
>  
> +	/**
> +	 * On secure devices which support warm reboot, the modem subsystem's cold boot is similar
> +	 * to an SSR sequence i.e the mba requires access to the modem memory to clear it out during
> +	 * Q6 cold boot. For modem SSR it will be a nop.
> +	 */
> +	ret = q6v5_xfer_mem_ownership(qproc, &qproc->mpss_perm, false, true,
> +				      qproc->mpss_phys, qproc->mpss_size);
> +	if (ret) {
> +		dev_err(qproc->dev, "assigning Q6 access to mpss memory failed: %d\n", ret);
> +		goto disable_active_clks;
> +	}
> +
>  	/* Assign MBA image access in DDR to q6 */
>  	ret = q6v5_xfer_mem_ownership(qproc, &qproc->mba_perm, false, true,
>  				      qproc->mba_phys, qproc->mba_size);
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

      reply	other threads:[~2020-09-15 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 17:37 [PATCH] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA cold boot Sibi Sankar
2020-09-15 18:33 ` Bjorn Andersson [this message]

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=20200915183347.GJ478@uller \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=evgreen@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=sibis@codeaurora.org \
    --cc=swboyd@chromium.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 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.