mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
soc: add mailbox interface for dsp sec reg ops [3/3]
PD#SWPL-6583 Problem: tm2 dsp bring up Solution: add the mbox interface Verify: AB311 Change-Id: Ifddb9bb0b22c651c5a0e02c2200874dcaa6dc2ce Signed-off-by: zhiqiang liang <zhiqiang.liang@amlogic.com>
This commit is contained in:
committed by
Jianxiong Pan
parent
aedfc41a8e
commit
c1be38bbf9
@@ -120,6 +120,7 @@ static int high_priority_cmds[] = {
|
||||
SCPI_CMD_SENSOR_CFG_BOUNDS,
|
||||
SCPI_CMD_WAKEUP_REASON_GET,
|
||||
SCPI_CMD_WAKEUP_REASON_CLR,
|
||||
SCPI_CMD_INIT_DSP,
|
||||
};
|
||||
|
||||
static struct scpi_dvfs_info *scpi_opps[MAX_DVFS_DOMAINS];
|
||||
@@ -556,6 +557,29 @@ int scpi_clr_wakeup_reason(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(scpi_clr_wakeup_reason);
|
||||
|
||||
int scpi_init_dsp_cfg0(u32 id, u32 addr, u32 cfg0)
|
||||
{
|
||||
struct scpi_data_buf sdata;
|
||||
struct mhu_data_buf mdata;
|
||||
u32 temp = 0;
|
||||
struct __packed {
|
||||
u32 id;
|
||||
u32 addr;
|
||||
u32 cfg0;
|
||||
} buf;
|
||||
buf.id = id;
|
||||
buf.addr = addr;
|
||||
buf.cfg0 = cfg0;
|
||||
|
||||
SCPI_SETUP_DBUF(sdata, mdata, SCPI_CL_NONE,
|
||||
SCPI_CMD_INIT_DSP, buf, temp);
|
||||
if (scpi_execute_cmd(&sdata))
|
||||
return -EPERM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(scpi_init_dsp_cfg0);
|
||||
|
||||
int scpi_get_cec_val(enum scpi_std_cmd index, u32 *p_cec)
|
||||
{
|
||||
struct scpi_data_buf sdata;
|
||||
|
||||
@@ -69,6 +69,7 @@ enum scpi_std_cmd {
|
||||
SCPI_CMD_WAKEUP_REASON_CLR = 0X31,
|
||||
SCPI_CMD_GET_ETHERNET_CALC = 0x32,
|
||||
SCPI_CMD_GET_CPUINFO = 0x33,
|
||||
SCPI_CMD_INIT_DSP = 0x34,
|
||||
|
||||
SCPI_CMD_GET_CEC1 = 0xB4,
|
||||
SCPI_CMD_GET_CEC2 = 0xB5,
|
||||
@@ -110,4 +111,5 @@ int scpi_clr_wakeup_reason(void);
|
||||
int scpi_get_cec_val(enum scpi_std_cmd index, u32 *p_cec);
|
||||
u8 scpi_get_ethernet_calc(void);
|
||||
int scpi_get_cpuinfo(enum scpi_get_pfm_type type, u32 *freq, u32 *vol);
|
||||
int scpi_init_dsp_cfg0(u32 id, u32 addr, u32 cfg0);
|
||||
#endif /*_SCPI_PROTOCOL_H_*/
|
||||
|
||||
Reference in New Issue
Block a user