-
Notifications
You must be signed in to change notification settings - Fork 349
Open
Labels
ZephyrIssues only observed with Zephyr integratedIssues only observed with Zephyr integratedenhancementNew feature or requestNew feature or request
Description
This is a meta issue to track work to move SOF code to use Zephyr native interfaces. The task is two-fold:
- move (audio) application code to use native Zephyr interfaces (this is the primary focus, affects all SOF users and configurations)
- move driver and hw platform code to Zephyr (this is secondary as new platforms will be Zephyr-only -- current we have some Intel and IMX platforms that support both XTOS and Zephyr and separate set of cleanups are needed for these platforms)
Change in brief: SOF application code will transition to Zephyr application interfaces. Change is done incrementally so that build with the "in-tree XTOS" continuous to work.
Guard rails:
- code in sof/src/audio is the primary application code, should only use Zephyr interfaces
- drivers in sof/src/drivers should be moved to Zephyr upstream
- arch code in sof/src/arch is not used for SOF Zephyr builds, this is only for XTOS builds
- rtos interface provided via <rtos/foo.h> interface with implmentation in
- sof/zephyr/include/rtos/
- sof/xtos/include/rtos/
Transition tools:
- sof/zephyr/wrapper.c - xtos-to-zephyr wrapping that was used for initial introduction of Zephyr. this will grow smaller and smaller and eventually be removed
- sof/src/arch/xtos-wrapper/ - zephyr-to-xtos wrapper used to maintain capability to build SOF app code on XTOS
- when application code moves to use native Zephyr interface, XTOS fallback should be added in src/xtos/include/ (example xtos/include/rtos/spinlock.h )
Ongoing work for generic code (affects all SOF configurations):
- Module init with native Zephyr interface [FEATURE] Implement module_init in Zephyr builds #5406 [SOF2.5]
- Spinlocks Convert spinlock to Zephyr API #5286
- System clock for timing Wallclock Clocks timer: Align SOF timer API with Zephyr #5393
- Logging, partially done in sof: replace log calls with zephyr logging api #5707
- Wait k_usleep() and k_msleep() wrappers for xtos #5770
- Zephyr DAI interface - partially done in dma: switch to native Zephyr API for dw-dma & HDA #5610
- Zephyr DMA interface - partially started in dma: switch to native Zephyr API for dw-dma & HDA #5610
- Split of RTOS headers for XTOS/Zephyr rtos: abstraction: partition RTOS logic into separate directories #6161 [SOF2.5]
- Probe interface to use native Zephyr DMA interface - [BUG] unable to enable probes logging for MTL #7218 and Enable probes on MTL #7989
- Zephyr cache API z_xtensa_cache_*() -- dependency to xtensa: use generic cache API zephyrproject-rtos/zephyr#50136
- irq_local_*able() to to Zephyr irq_lock() / irq_unlock()
- make CONFIG_SOF_ZEPHYR_STRICT_HEADERS the default [BUG] make CONFIG_SOF_ZEPHYR_STRICT_HEADERS the default #9015
- cleanup overlap between Zephyr and SOF lib dma.h interfaces [FEATURE] Clean up SOF DMA interface(s) #9561
Ongoing work for SOF platform layer (affects all SOF configurations):
- Platform.h - [FEATURE][Zephyr] Clarify expectations of platform.h for Zephyr SOF builds #7248
- implement clk.h without platform layer [FEATURE][Zephyr] implement clk.h with native Zephyr interface and drop platform clk.h #9541
- implement mailbox.h without platform layer [FEATURE][Zephyr] replace mailbox.h with a IPC abstraction #9697
- implement cpu.h without platform layer -- zephyr: lib/cpu.h: remove dependency to platform layer #9648
- implement dai.h without platform layer -- remove platform lib/dai.h from SOF Zephyr builds #9653
- implement dma.h without platform layer -- zephyr: lib/dma.h: limit use of platform/lib/dma.h #9667
- implement pm_runtime.h without platform layer -- zephyr: decouple from platform pm_runtime.h interface #9495
Ongoing work for specific platforms (Intel cAVS, NXP IMX)
- PM runtime move to Zephyr PM model (Intel ACE done, Intel cAVS in zephyr: cavs: use zephyr pm, clk and dma glue #7183 )
- [FEATURE][Zephyr] Move all hw init code from platform_init() to Zephyr #5602
From @dbaluta - For NXP we have on roadmap to port to Zephyr:
- DAIs (SAI and ESAI);
- EDMA;
- SDMA;
- Interrupt controller (irq steer).
hongshui3000, dbaluta and iuliana-prodanhongshui3000
Metadata
Metadata
Labels
ZephyrIssues only observed with Zephyr integratedIssues only observed with Zephyr integratedenhancementNew feature or requestNew feature or request