diff --git a/drivers/amlogic/mailbox/scpi_protocol.c b/drivers/amlogic/mailbox/scpi_protocol.c index 22883ee98e59..cc5f3692d15d 100644 --- a/drivers/amlogic/mailbox/scpi_protocol.c +++ b/drivers/amlogic/mailbox/scpi_protocol.c @@ -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; diff --git a/include/linux/amlogic/scpi_protocol.h b/include/linux/amlogic/scpi_protocol.h index c886ce4f522e..06c829d010c9 100644 --- a/include/linux/amlogic/scpi_protocol.h +++ b/include/linux/amlogic/scpi_protocol.h @@ -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_*/