Commit Graph

2316 Commits

Author SHA1 Message Date
Guennadi Liakhovetski acad9bbf94 work: make work_new_queue() static
work_new_queue() is never called outside of work.c, make it static.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
Guennadi Liakhovetski 5f23dac791 bootloader: simplify preprocessor conditionals
Use #elif to select between platforms in the bootloader.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
Guennadi Liakhovetski 44aa1193e7 dw-dma: (cosmetic) remove superfluous type-casts
In C casts between "void *" and any other pointers aren't needed.
Remove several occurrances.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 17:08:03 +00:00
Guennadi Liakhovetski 9aff15f6cc dw-dma: (cosmetic) eliminate a goto
Instead of jumping out of a loop with a "goto" use break and test
the loop exit reason.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 17:08:03 +00:00
Guennadi Liakhovetski 7fd51425f6 dw-dma: (cosmetic) simplify assignments
Replace multiple occurrances of assignment sequences like
	a |= x1;
	a |= x2;
with a simpler
	a |= x1 | x2;

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 17:08:03 +00:00
Guennadi Liakhovetski bc5c1b49c8 dw-dma: (cosmetic) remove redundant variable initialisations
Remove several occurrances of redundant variable initialisations
and remove some trivial variables, that are only initialised
and used once without ever being changed.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 17:08:03 +00:00
Guennadi Liakhovetski 25739de839 dw-dma: (cosmetic) use pointer shortcuts
Simplify the DW DMA driver by using channel and LLI pointers instead
of repeating the same pattern multiple times within functions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 17:08:03 +00:00
Tomasz Lauda d918f1b3d0 pipeline: refactor whole pipeline component
Refactor the whole pipeline component:
- one method to handle both upstream and downstream walk
  across the pipeline graph,
- code deduplication,
- cuts pipeline implementation size by half.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda e300861d4a pipeline: refactor complete function
Refactors pipeline complete function to work with pipelines,
which don't have scheduling component, but are just connected
to the pipeline with one.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda cd6f59fb1e pipeline: refactor connect functions
Refactors pipeline connect methods to avoid code duplication.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda 52c5af4142 component: remove is_endpoint field
Removes is_endpoint field from component.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda a6b190e8f2 buffer: remove "connected" field
Removes "connected" field from buffer as it's not needed.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda 5a2e7b866f cache: exclude cache defines to separate header
Moves cache operation defines to generic cache header.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 17:07:10 +00:00
Tomasz Lauda 8134a46705 work: fix to the previous change for ASYNC tasks
Fixes previous change for ASYNC tasks.
By mistake it didn't take into account provided timeout.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 15:42:56 +00:00
Guennadi Liakhovetski e5bc088e04 dw-dma: remove superfluous check
In dw_dma_start() .lli_current cannot be NULL. If it were NULL, lines
following the check, would cause a NULL-pointer dereference. Remove
the superfluous check.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 14:23:11 +00:00
Tomasz Lauda 1f97d44a3b work: proper timeout for new and rescheduled work
Takes work flag into consideration during initial and
rescheduled timeout setup.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-23 12:07:34 +00:00
Janusz Jankowski b749cd0fab [skip ci] github: add @jajanusz as cmake owner
+ scripts related to CMake and Kconfig

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 11:13:07 +00:00
Janusz Jankowski 328562093e gitignore: update for kconfig
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 11:08:09 +00:00
Pan Xiuli 2b0249373f scripts: change names for binary in qemu-check
Use back old style name.
Modify the build folder as gcc and xcc prefix added.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Pan Xiuli 140914aa03 scripts: update build all scripts
Use different build folder for gcc and xcc build.
Will auto selected if ROM build is not supported for the platform,
thus make -a -r can work.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Pan Xiuli 5c93db8ca7 CMake: restore the naming style of binaries
use sof-*.ri back to make alignment with Linux driver FW name
requirement.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-01-23 10:59:50 +00:00
Guennadi Liakhovetski 72d398c30d cavs: add a DMA capability to the system-runtime heap zone
The system-runtime zone on CAVS system is suitable for DMA, add the
capability to heap descriptors.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski f451f67028 alloc: always check heap capabilities
Currently only the runtime zone has several heaps with different
capabilities on some systems. So that if a memory allocation request
is made from that zone, a suitable heap is selected. Additionally,
if the request cannot be satisfied from the runtime heap, an attempt
is made to satisfy it from the buffer heap. The other two zones -
system and system-runtime - have per-core heaps with identical
capabilities. If the request to one of those zones cannot be
satisfied from it, no attempt is made to allocate memory from a
different zone. Supposedly because of this determinism no capability
check is performed. This is wrong, since if capabilities don't match
it should be assumed, that the obtained memory will not be suitable
for the designated purpose. This patch adds the missing checks.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski c8f1edfaa4 alloc: fix and improve the block allocation algorithm
The block allocation algorithm, as implemented in _balloc(), is first
trying to find a single free memory block to satisfy the request. If
that fails it is then trying to allocate several blocks in a
sequence. That part is implemented wrongly. It can end up allocating
multiple such block sequences, and not using but leaking them
instead. This patch first simplifies the search for a single suitable
buffer, then fixes the leakage.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 8c62c4457c alloc: improve a jump procision
In _balloc() if no heap was found, no need to jump to a location in
the function, where a potentially successful allocation is still
being processed, jump directly to the unlock-and-return point.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 5a9b8e7ee9 alloc: fix two potential NULL dereferences
bzero() doesn't check its pointer argument for NULL, the caller has
to avoid such calls.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 84d7eabde9 alloc: eliminate two redundant variable initialisations
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 46b7645c92 alloc: eliminate two goto statements
Use "break" to terminate loops instead of a "goto."

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Guennadi Liakhovetski 48145df552 alloc: optimise the contiguous block allocation algorithm
If we found a busy block among the potential sequence of blocks, that
we were trying to allocate, no need to retry the attempt from the
next starting block, unless it was the first block, that was busy. It
is enough to resume searching from the next block after the busy one.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 09:21:11 +00:00
Zhu Yingjiang a766e471b0 add nocodec topology for CNL
add nocodec topology for CNL, with three SSPs and one DMIC

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-01-23 09:20:41 +00:00
Janusz Jankowski 297958f418 icl: increase text section size
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 2843b43f94 cmake: update qemu-check.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 06b576f828 cmake: update host-build-all.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9840ecbbfe cmake: update xtensa-build-all.sh
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0682b6e923 cmake: debug build support
Change DEBUG_BUILD define to use Kconfig's CONFIG_DEBUG

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 1526860228 cmake: vm rom build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 4574fdc15a cmake: add overrideconfig
overrideconfig is custom target that can be used
to set config values from scripts

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski d91be6da67 buildsystem: remove autotools from sof
This commit doesn't touch tools buildsystem.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 82b4da291b cmake: defconfigs support
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 07bd1b20cb cmake: add doc CMakeLists
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski a59e428b61 test: debugability: fix for full paths
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9a3dff5475 cmake: add CMakeLists for unit tests
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 7680a7b0dc cmake: add testbench host build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski d2528e101f cmake: bootloader build and meu support
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0beb84b828 cmake: add rimage build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9af711c761 rimage: remove config.h dependency
man_* files don't need it
pkcs can use PEM_KEY_PREFIX from passed in defines

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski e0ba98d21a cmake: add CMakeLists for firmware build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 82d234466a cmake: version script
Replace version.sh with cmake script.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0fd97adfb0 cmake: add utility scripts
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 86cd1a9ac4 kconfig: add initial Kconfig files
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00