Skip to content

Commit 62210f7

Browse files
Sibi Sankarandersson
authored andcommitted
remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP
The UEFI loads a lite variant of the ADSP firmware to support charging use cases. The kernel needs to unload and reload it with the firmware that has full feature support for audio. This patch arbitarily shutsdown the lite firmware before loading the full firmware. Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20240212-x1e80100-remoteproc-v2-3-604614367f38@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 1d7823f commit 62210f7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/remoteproc/qcom_q6v5_pas.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ struct adsp_data {
4141
const char *dtb_firmware_name;
4242
int pas_id;
4343
int dtb_pas_id;
44+
int lite_pas_id;
4445
unsigned int minidump_id;
4546
bool auto_boot;
4647
bool decrypt_shutdown;
@@ -77,6 +78,7 @@ struct qcom_adsp {
7778
const char *dtb_firmware_name;
7879
int pas_id;
7980
int dtb_pas_id;
81+
int lite_pas_id;
8082
unsigned int minidump_id;
8183
int crash_reason_smem;
8284
bool decrypt_shutdown;
@@ -218,6 +220,9 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
218220
/* Store firmware handle to be used in adsp_start() */
219221
adsp->firmware = fw;
220222

223+
if (adsp->lite_pas_id)
224+
ret = qcom_scm_pas_shutdown(adsp->lite_pas_id);
225+
221226
if (adsp->dtb_pas_id) {
222227
ret = request_firmware(&adsp->dtb_firmware, adsp->dtb_firmware_name, adsp->dev);
223228
if (ret) {
@@ -720,6 +725,7 @@ static int adsp_probe(struct platform_device *pdev)
720725
adsp->rproc = rproc;
721726
adsp->minidump_id = desc->minidump_id;
722727
adsp->pas_id = desc->pas_id;
728+
adsp->lite_pas_id = desc->lite_pas_id;
723729
adsp->info_name = desc->sysmon_name;
724730
adsp->decrypt_shutdown = desc->decrypt_shutdown;
725731
adsp->region_assign_idx = desc->region_assign_idx;
@@ -1018,6 +1024,7 @@ static const struct adsp_data x1e80100_adsp_resource = {
10181024
.dtb_firmware_name = "adsp_dtb.mdt",
10191025
.pas_id = 1,
10201026
.dtb_pas_id = 0x24,
1027+
.lite_pas_id = 0x1f,
10211028
.minidump_id = 5,
10221029
.auto_boot = true,
10231030
.proxy_pd_names = (char*[]){

0 commit comments

Comments
 (0)