Commit Graph

2384 Commits

Author SHA1 Message Date
Tomasz Lauda 724d267413 dw-dma: add start delay for timer driven capture streams
Adds start delay for timer driven capture streams.
External interface is enabled after DMA, so we need to compensate it.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-01-24 15:41:07 +00:00
Keyon Jie 905bad4252 scripts: xtensa-build-all: Add support to force build UP Arch
Add -u option to allow force building xtensa(up) ARCH on platforms which
usually building xtensa-smp by default.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2019-01-24 15:32:27 +00:00
Marcin Rajwa 26a6541b1b GDB: Initialized from IPC handler + generalized debug addresses.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-01-24 15:31:57 +00:00
Marcin Rajwa c30f2fc22b GDB: Adjusted to new build system.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-01-24 15:31:57 +00:00
Marcin Rajwa cfdfcf5661 GDB: Added packet parser.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-01-24 15:31:57 +00:00
Marcin Rajwa 9a3555e2b7 MEMORY: Enabled LP SRAM for ICL platform.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-01-24 15:31:30 +00:00
Rander Wang d53466ad7e IPC: port PM D3 entry fixes to CNL, WHL & CML
On CNL, we need to set two registers: IPC_DIPCTDR and IPC_DIPCTDA

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2019-01-24 15:30:46 +00:00
Liam Girdwood cfaaa7ee53
Merge pull request #880 from plbossart/fix/kmod_scripts
kmod_scripts: fix dependencies and add delays
2019-01-24 08:33:48 +00:00
Liam Girdwood 0cd5fb0629
Merge pull request #878 from jajanusz/update-cmocka-git
cmake: update cmocka git
2019-01-24 08:17:44 +00:00
Liam Girdwood 570ce06599
Merge pull request #877 from dbaluta/master
drivers: Remove unused unused host_msg field
2019-01-24 08:12:16 +00:00
Daniel Baluta 7c37501568 drivers: Remove unused host_msg field
This is legacy and was used to keep current
message from host.

It is now unused so remove it. Notice that we
also remove temp var msg.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-01-24 00:20:08 +02:00
Janusz Jankowski 8051fe393c readme: update for cmake
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 20:11:00 +00:00
Guennadi Liakhovetski 4593e60b82 sue: fix several alignment issues
Fix several indentation violations in memory.h

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
Guennadi Liakhovetski d4004b4c38 schedule: fix a typo in a comment
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
Guennadi Liakhovetski bc55ff2172 interrupt: (cosmetic) move a spin-lock, remove function declarations
Simple variable declarations with no initialisation don't need to
be protected, move them out of a spin-lock. Also remove superfluous
static function declarations.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
Guennadi Liakhovetski 4ff218b482 sue: use a symbolic name for a task priority
Use TASK_PRI_MED instead of a hardcoded 0 for the IPC task on Sue
Creek.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-01-23 19:58:02 +00:00
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
Janusz Jankowski 97f3b70d65 cmake: update cmocka git
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-23 20:31:24 +01:00
Pierre-Louis Bossart 7f7e48e27e kmod_scripts: fix dependencies and add delays
dependencies are incorrect due to kernel changes

also add 6s delay after insert to let userspace complete its tasks and
go back to idle

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2019-01-23 12:56:21 -06: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