xref: /optee_os/core/pta/qcom/pas/lpass.c (revision abca35a69f9bea0496cf05e025c3c36e6d5ea68b)
1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright (c) 2026, Qualcomm Technologies, Inc. and/or its subsidiaries.
4  */
5 
6 #include <io.h>
7 #include <mm/core_mmu.h>
8 #include <stdint.h>
9 #include <string.h>
10 
11 #include "dsp_boot.h"
12 #include "pas.h"
13 
14 TEE_Result lpass_fw_start(struct qcom_pas_data *data)
15 {
16 	const struct dsp_fw_boot_regs *reg = dsp_fw_get_boot_regs(data->pas_id);
17 	vaddr_t base = io_pa_or_va(&data->base, data->size);
18 
19 	if (!reg || !base)
20 		return TEE_ERROR_GENERIC;
21 
22 	io_write32(base + reg->lpass.efuse_evb_sel, 0);
23 
24 	return dsp_fw_start(data, reg);
25 }
26 
27 TEE_Result lpass_fw_shutdown(struct qcom_pas_data *data __unused)
28 {
29 	return TEE_ERROR_NOT_IMPLEMENTED;
30 }
31