Skip to content

Commit

Permalink
zephyr: remove unused module initialisation
Browse files Browse the repository at this point in the history
All SOF modules are now initialised using native Zephyr APIs, no need
any more in a dedicated ELF section. TODO: remove from linker scripts
once this is merged.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh authored and kv2019i committed Jan 26, 2023
1 parent 6b30509 commit 6b9c3ca
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions zephyr/wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,6 @@ unsigned int _xtos_ints_off(unsigned int mask)
return 0;
}

/*
* Audio components.
*
* Integrated except for linkage so symbols are "used" here until linker
* support is ready in Zephyr. TODO: fix component linkage in Zephyr.
*/

/* TODO: this is not yet working with Zephyr - section has been created but
* no symbols are being loaded into ELF file.
*/
extern intptr_t _module_init_start;
extern intptr_t _module_init_end;

static void sys_module_init(void)
{
#if !CONFIG_LIBRARY
intptr_t *module_init = (intptr_t *)(&_module_init_start);

for (; module_init < (intptr_t *)&_module_init_end; ++module_init)
((void(*)(void))(*module_init))();
#endif
}

/* Zephyr redefines log_message() and mtrace_printf() which leaves
* totally empty the .static_log_entries ELF sections for the
* sof-logger. This makes smex fail. Define at least one such section to
Expand All @@ -202,9 +179,6 @@ int task_main_start(struct sof *sof)
/* init default audio components */
sys_comp_init(sof);

/* init self-registered modules */
sys_module_init();

/* init pipeline position offsets */
pipeline_posn_init(sof);

Expand Down

0 comments on commit 6b9c3ca

Please sign in to comment.