All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot
@ 2020-09-17 17:58 Sibi Sankar
  2020-09-17 20:24 ` Stephen Boyd
  2020-10-14  0:10 ` patchwork-bot+linux-remoteproc
  0 siblings, 2 replies; 3+ messages in thread
From: Sibi Sankar @ 2020-09-17 17:58 UTC (permalink / raw)
  To: bjorn.andersson, swboyd
  Cc: agross, linux-arm-msm, linux-remoteproc, linux-kernel, ohad,
	evgreen, Sibi Sankar

On secure devices which support warm reset, the MBA firmware requires
access to the modem region to clear them out. Hence provide Q6 access
to this region before MBA boot. This will be a nop during a modem SSR.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
---

V3:
 * Fixup comment style [Stephen] 

V2:
 * Fixup comments [Bjorn] 

 drivers/remoteproc/qcom_q6v5_mss.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
index c401bcc263fa..eb3457a6c3b7 100644
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -931,6 +931,17 @@ static int q6v5_mba_load(struct q6v5 *qproc)
 		goto assert_reset;
 	}
 
+	/*
+	 * Some versions of the MBA firmware will upon boot wipe the MPSS region as well, so provide
+	 * the Q6 access to this region.
+	 */
+	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);
@@ -1135,10 +1146,9 @@ static int q6v5_mpss_load(struct q6v5 *qproc)
 			max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K);
 	}
 
-	/**
+	/*
 	 * In case of a modem subsystem restart on secure devices, the modem
-	 * memory can be reclaimed only after MBA is loaded. For modem cold
-	 * boot this will be a nop
+	 * memory can be reclaimed only after MBA is loaded.
 	 */
 	q6v5_xfer_mem_ownership(qproc, &qproc->mpss_perm, true, false,
 				qproc->mpss_phys, qproc->mpss_size);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot
  2020-09-17 17:58 [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot Sibi Sankar
@ 2020-09-17 20:24 ` Stephen Boyd
  2020-10-14  0:10 ` patchwork-bot+linux-remoteproc
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-09-17 20:24 UTC (permalink / raw)
  To: Sibi Sankar, bjorn.andersson
  Cc: agross, linux-arm-msm, linux-remoteproc, linux-kernel, ohad,
	evgreen, Sibi Sankar

Quoting Sibi Sankar (2020-09-17 10:58:40)
> On secure devices which support warm reset, the MBA firmware requires
> access to the modem region to clear them out. Hence provide Q6 access
> to this region before MBA boot. This will be a nop during a modem SSR.
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot
  2020-09-17 17:58 [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot Sibi Sankar
  2020-09-17 20:24 ` Stephen Boyd
@ 2020-10-14  0:10 ` patchwork-bot+linux-remoteproc
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-remoteproc @ 2020-10-14  0:10 UTC (permalink / raw)
  To: Sibi Sankar; +Cc: linux-remoteproc

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

On Thu, 17 Sep 2020 23:28:40 +0530 you wrote:
> On secure devices which support warm reset, the MBA firmware requires
> access to the modem region to clear them out. Hence provide Q6 access
> to this region before MBA boot. This will be a nop during a modem SSR.
> 
> Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
> ---
> 
> [...]

Here is the summary with links:
  - [v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot
    https://git.kernel.org/andersson/remoteproc/c/4360f93ac39c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-14  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 17:58 [PATCH v3] remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot Sibi Sankar
2020-09-17 20:24 ` Stephen Boyd
2020-10-14  0:10 ` patchwork-bot+linux-remoteproc

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.