probe: convert to Zephyr native initialisation

Use SOF_MODULE_INIT() to register probe with the Zephyr
initialisation framework.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2023-01-25 14:36:48 +01:00 committed by Kai Vehmanen
parent a6d6ed7632
commit 6b3050918a
2 changed files with 2 additions and 15 deletions

View File

@ -11,6 +11,7 @@
#include <sof/trace/trace.h> #include <sof/trace/trace.h>
#include <user/trace.h> #include <user/trace.h>
#include <rtos/alloc.h> #include <rtos/alloc.h>
#include <rtos/init.h>
#include <sof/lib/dma.h> #include <sof/lib/dma.h>
#include <sof/lib/notifier.h> #include <sof/lib/notifier.h>
#include <sof/lib/uuid.h> #include <sof/lib/uuid.h>
@ -1442,4 +1443,5 @@ UT_STATIC void sys_comp_probe_init(void)
} }
DECLARE_MODULE(sys_comp_probe_init); DECLARE_MODULE(sys_comp_probe_init);
SOF_MODULE_INIT(probe, sys_comp_probe_init);
#endif #endif

View File

@ -176,16 +176,6 @@ static void sys_module_init(void)
#endif #endif
} }
/*
* TODO: all the audio processing components/modules constructor should be
* linked to the module_init section, but this is not happening. Just call
* constructors directly atm.
*/
#if CONFIG_IPC_MAJOR_4
void sys_comp_probe_init(void);
#endif
/* Zephyr redefines log_message() and mtrace_printf() which leaves /* Zephyr redefines log_message() and mtrace_printf() which leaves
* totally empty the .static_log_entries ELF sections for the * totally empty the .static_log_entries ELF sections for the
* sof-logger. This makes smex fail. Define at least one such section to * sof-logger. This makes smex fail. Define at least one such section to
@ -223,11 +213,6 @@ int task_main_start(struct sof *sof)
int start_complete(void) int start_complete(void)
{ {
#if CONFIG_IPC_MAJOR_4
if (IS_ENABLED(CONFIG_PROBE))
sys_comp_probe_init();
#endif
#if defined(CONFIG_IMX) #if defined(CONFIG_IMX)
#define SOF_IPC_QUEUED_DOMAIN SOF_SCHEDULE_LL_DMA #define SOF_IPC_QUEUED_DOMAIN SOF_SCHEDULE_LL_DMA
#else #else