remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA cold boot
Subsystems (2)
PATCH 1/1 remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA cold boot
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.
---
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.
drivers/remoteproc/qcom_q6v5_mss.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/remoteproc/qcom_q6v5_mss.c +12 -0
@@ -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);
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 11 lines · Sibi Sankar
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 <[email protected]>---
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
Quoted 30 lines
drivers/remoteproc/qcom_q6v5_mss.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/remoteproc/qcom_q6v5_mss.c +12
-0@@ -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);Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project