mirror of https://github.com/thesofproject/sof.git
test: ipc: Add FW testing IPC foundations.
Add a new IPC global class for FW testing alongside the first "test" IPC command for flooding the DSP with IPCs. Needs to have CONFIG_DEBUG enabled. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
261fef4517
commit
b01ed57e31
|
@ -93,6 +93,7 @@
|
|||
#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)
|
||||
#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U)
|
||||
#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)
|
||||
#define SOF_IPC_GLB_TEST SOF_GLB_TYPE(0xBU)
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -173,6 +174,14 @@
|
|||
|
||||
/** @} */
|
||||
|
||||
/** \name DSP Command: Test - Debug build only
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001)
|
||||
|
||||
/** @} */
|
||||
|
||||
/** \name IPC Message Definitions
|
||||
* @{
|
||||
*/
|
||||
|
|
|
@ -1100,6 +1100,21 @@ static int ipc_glb_tplg_message(uint32_t header)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
static int ipc_glb_test_message(uint32_t header)
|
||||
{
|
||||
uint32_t cmd = iCS(header);
|
||||
|
||||
switch (cmd) {
|
||||
case SOF_IPC_TEST_IPC_FLOOD:
|
||||
return 0; /* just return so next IPC can be sent */
|
||||
default:
|
||||
trace_ipc_error("ipc: unknown test header 0x%x", header);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Global IPC Operations.
|
||||
*/
|
||||
|
@ -1136,6 +1151,10 @@ int ipc_cmd(void)
|
|||
return ipc_glb_debug_message(hdr->cmd);
|
||||
case SOF_IPC_GLB_GDB_DEBUG:
|
||||
return ipc_glb_gdb_debug(hdr->cmd);
|
||||
#ifdef CONFIG_DEBUG
|
||||
case SOF_IPC_GLB_TEST:
|
||||
return ipc_glb_test_message(hdr->cmd);
|
||||
#endif
|
||||
default:
|
||||
trace_ipc_error("ipc: unknown command type %u", type);
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue