Skip to content

Commit 1429649

Browse files
stephan-ghandersson
authored andcommitted
remoteproc: qcom: pas: Shutdown lite ADSP DTB on X1E
The ADSP firmware on X1E has separate firmware binaries for the main firmware and the DTB. The same applies for the "lite" firmware loaded by the boot firmware. When preparing to load the new ADSP firmware we shutdown the lite_pas_id for the main firmware, but we don't shutdown the corresponding lite pas_id for the DTB. The fact that we're leaving it "running" forever becomes obvious if you try to reuse (or just access) the memory region used by the "lite" firmware: The &adsp_boot_mem is accessible, but accessing the &adsp_boot_dtb_mem results in a crash. We don't support reusing the memory regions currently, but nevertheless we should not keep part of the lite firmware running. Fix this by adding the lite_dtb_pas_id and shutting it down as well. We don't have a way to detect if the lite firmware is actually running yet, so ignore the return status of qcom_scm_pas_shutdown() for now. This was already the case before, the assignment to "ret" is not used anywhere. Fixes: 62210f7 ("remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org> Link: https://lore.kernel.org/r/20250820-rproc-qcom-q6v5-fixes-v2-3-910b1a3aff71@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 5489866 commit 1429649

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/remoteproc/qcom_q6v5_pas.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct qcom_pas_data {
4242
int pas_id;
4343
int dtb_pas_id;
4444
int lite_pas_id;
45+
int lite_dtb_pas_id;
4546
unsigned int minidump_id;
4647
bool auto_boot;
4748
bool decrypt_shutdown;
@@ -80,6 +81,7 @@ struct qcom_pas {
8081
int pas_id;
8182
int dtb_pas_id;
8283
int lite_pas_id;
84+
int lite_dtb_pas_id;
8385
unsigned int minidump_id;
8486
int crash_reason_smem;
8587
unsigned int smem_host_id;
@@ -226,6 +228,8 @@ static int qcom_pas_load(struct rproc *rproc, const struct firmware *fw)
226228

227229
if (pas->lite_pas_id)
228230
ret = qcom_scm_pas_shutdown(pas->lite_pas_id);
231+
if (pas->lite_dtb_pas_id)
232+
qcom_scm_pas_shutdown(pas->lite_dtb_pas_id);
229233

230234
if (pas->dtb_pas_id) {
231235
ret = request_firmware(&pas->dtb_firmware, pas->dtb_firmware_name, pas->dev);
@@ -722,6 +726,7 @@ static int qcom_pas_probe(struct platform_device *pdev)
722726
pas->minidump_id = desc->minidump_id;
723727
pas->pas_id = desc->pas_id;
724728
pas->lite_pas_id = desc->lite_pas_id;
729+
pas->lite_dtb_pas_id = desc->lite_dtb_pas_id;
725730
pas->info_name = desc->sysmon_name;
726731
pas->smem_host_id = desc->smem_host_id;
727732
pas->decrypt_shutdown = desc->decrypt_shutdown;
@@ -1085,6 +1090,7 @@ static const struct qcom_pas_data x1e80100_adsp_resource = {
10851090
.pas_id = 1,
10861091
.dtb_pas_id = 0x24,
10871092
.lite_pas_id = 0x1f,
1093+
.lite_dtb_pas_id = 0x29,
10881094
.minidump_id = 5,
10891095
.auto_boot = true,
10901096
.proxy_pd_names = (char*[]){

0 commit comments

Comments
 (0)