Commit Graph

11 Commits

Author SHA1 Message Date
Guennadi Liakhovetski 372d3873bd zephyr: make sure non-atomic 64-bit timer is consistent
The Zephyr timer implementation reads high and low 32 bits
in a non-atomic way. Add a loop to make sure the read is
consistent.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski 9ac38d8828 zephyr: fix regression: add platform_timer_get_atomic()
Recently added platform_timer_get_atomic() has to be
implemented for Zephyr too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-02-03 16:35:10 +00:00
Guennadi Liakhovetski b580a787da zephyr: update for unsupported arch builds
Add some files from src/platform/library/ to generic arch
builds with Zephyr.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-01-11 16:11:42 +00:00
Guennadi Liakhovetski 1d39806f4e zephyr: extend the wrapper for generic architecture support
When building SOF with Zephyr for unsupported architectures
the following additional adjustments to the wrapper are required:
1. define HEAP_RUNTIME_SIZE
2. implement stubs for interrupt handlich code
3. remove arch_timer_get_system() as it's provided by a header
4. hardcode "return 0;" for platform_timer_get()
5. disable sys_module_init() which anyway isn't yet functional
   under Zephyr
6. add dummy platform_init() and platform_boot_complete()
7. add log_const_sof

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-21 16:22:54 +00:00
Guennadi Liakhovetski a91219eb79 zephyr: remove infinite recursion on Broadwell
Broadwell support with Zephyr had only been dry-coded, it has never
been tested, and it contains an infinite recursion bug: functions
platform_timer_get() and arch_timer_get_system() call each other
infinitely. Break the recursion formally, until a proper fix is
available.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-11-18 11:37:37 +00:00
Andy Ross 2664fc30fb zephyr/wrapper: Disable check for CONFIG_SYS_HEAP_ALIGNED_ALLOC
This kconfig variable no longer exists in upstream Zephyr (the feature
it used to control is now zero-overhead and always enabled).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-11-16 11:23:50 +00:00
Guennadi Liakhovetski b672923809 zephyr: adjust for new location of audio component samples
Audio component samples have been moved to a new location, fix Zephyr
builds to account for it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Guennadi Liakhovetski 9a02ffdeb7 zephyr: fix compiler warnings due to recent Zephyr changes
Fix two compiler warnings, introduced by recent Zephyr changes.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-23 10:16:55 +01:00
Guennadi Liakhovetski 94ed4ca325 zephyr: remote the platform_timer_set() wrapper
platform_timer_set() isn't called from Zephyr any more, remote it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2020-10-01 22:06:40 +01:00
Liam Girdwood 4b2edf8eed zephyr: wrapper: complete zephyr support for working audio
This patch finalises the wrapper to allow LL scheduling of
timer domain audio, EDF sccheduling of IPC, trace re-direction
and kconfig build support.

There are still many items that are WIP and have been marked with
TODO: comments.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-08-14 15:07:34 +01:00
Liam Girdwood 207c6fdbee zephyr: add wrappers to bridge between Zephyr and SOF APIs.
Add a wrapper to convert SOF API calls to Zephyr equivalents. This allows
development to continue in parallel with xtos/HAL and Zephyr RTOSes until
parity is reached.

The initlial Zephyr APIs to be used are HAL, boot, IRQs, scheduling and
memory. The wrapper reflects this and will probably grow until feature
parity is reached when it can be deleted (as Zephyr APIs can be used
directly).

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2020-04-21 20:34:34 +01:00