Commit Graph

36 Commits

Author SHA1 Message Date
Karol Trzcinski 0aa3e4b4ca ipc: debug: Add KConfig to conditionally compile memory scan feature
This feature is not needed to get functional firmware,
so may be disabled for platforms with low memory space,
like baytrail and cherrytrail.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-10-06 11:35:04 +01:00
Pierre-Louis Bossart 28c3fd7428 Revert "idc: set budget for IDC task"
This reverts commit 443319a718.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2020-07-29 15:50:42 -05:00
Andy Ross fd506970cc zephyr: kconfig: rename CONFIG_SMP -> CONFIG_MULTICORE
This kconfig collides with one of the same name in Zephyr.  Rename it
for clarity ("MULTICORE" was picked for symmetry with the existing
"CORE_COUNT", though it's admittedly a little long...).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-07-24 19:55:05 +01:00
Janusz Jankowski 443319a718 idc: set budget for IDC task
IDC task may be time consuming and has high priority,
what may make other tasks stall. To prevent this it should
have limited cycles budget per systick.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-07-21 11:00:38 +02:00
Adrian Bonislawski 175ef89b81 diag: DSP residency counters
This will add DSP residency counters to Debug menu
It introduces generic DSP states R0, R1 and R2 with simple
reporting changes and tracing it in SRAM_REG mailbox.
Number of DSP residency states can be easily extended depending on platform needs.

In initial version CAVS support is added with the following approach:
R0 - in HPRO
R1 - in LPRO
R2 - LPS
with extra priority to R2 (LPS).

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2020-07-14 13:15:31 +01:00
Tomasz Lauda 3a72e9e5d6 kconfig: remove cAVS menu
Removes cAVS menu and moves all platform specific things
to platform menu.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2020-06-10 10:40:02 +01:00
Marc Herbert c9c1b225e3 Kconfig: use relative 'rsource' paths so SOF can be a Zephyr module
As documented in https://docs.zephyrproject.org/2.2.0/guides/modules.html,
Zephyr and Kconfiglib support merging Kconfig menus across multiple git
repos. This requires relative inclusion paths.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-06-03 10:46:34 +01:00
Janusz Jankowski b5ec44b067 memory: change LP_SRAM to helper config
Having both LP_SRAM (bool) and LP_MEMORY_BANKS (int) is error prone.
It's better to make LP_SRAM just a helper config that is set
to true if there is any LP memory bank in use.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2020-02-04 11:30:02 +00:00
Marcin Maka 114a718e8d perf: add simple performance timestamps macros
Performance ts macros use both the platform timer and cpu timer
in case the latter is not always-running-timer.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-01-16 13:28:58 +00:00
Daniel Baluta 04b229d2b3 kconfig: Move WAITI_DELAY outside of CAVS menu
WAITI_DELAY is selected for LX6 Xtensa platforms one of which being
i.MX8 Hifi4 DSP.

Also, remove the input prompt because the actual WAITI_DELAY cannot
be set at compile time it is automatically selected based on arhitecture.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-12-03 17:26:17 +01:00
Marcin Maka de22810b0f pm: cavs: add lps flow
Use of low power sequencer lowers power consumption, since
DSP may be completely turned off when calling waiti and then
powered on interrupt, booting via restore vector installed in
lpsram.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-11-08 14:37:29 +01:00
Janusz Jankowski 66ce9791fa kconfig: optimization levels
Add configs for optimization levels.
These configs should be used by build system to properly
tune compiler flags.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-08 10:28:21 +01:00
Tomasz Lauda fee25179d7 kconfig: enable interrupt levels per platform
Deselects all interrupt levels by default and sets
them appropriately for every platform.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-07 19:02:57 +02:00
Tomasz Lauda 9c9db8b76e kconfig: add interrupt related options
Adds options, that allow to select the supported interrupt
levels on given platform. Disabling any interrupt level
allows for less memory consumption. Currently all the options
are enabled by default.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-07 19:02:57 +02:00
Tomasz Lauda faf12ac7a7 dw-dma: rename DMA_AGGREGATED_IRQ definition
Renames DMA_AGGREGATED_IRQ to DW_DMA_AGGREGATED_IRQ
definition. This is more appropriate as it's not generic
DMA setting.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-10-01 14:32:36 +02:00
Marcin Maka ced0ea054c arch: xtensa: remove dependency on platform headers
Integration specific tweaks for xtensa architecture should
use Kconfig options selected for required platforms, not the
platform headers.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-09-16 12:59:34 +02:00
Tomasz Lauda 20acc16791 edf_schedule: implement the new version of EDF scheduler
This patch implements the new version of EDF scheduler.
This is the first basic implementation, which can be easily extended
in the future.

Previous implementation had two major flaws:
- Tasks could only be preempted based on the interrupt level on which
they have been scheduled, so it was limited based on the hardware.
- This led to the system not fully utilized, so we could never achieve
full EDF functionality.

The new implementation uses only one software interrupt and allows for
dynamic context switching between different tasks based on the deadline.
Also for some cases priority is taken into consideration e.g. for idle
and almost idle tasks, which don't have deadline at all and should be
executed only if the system is free. All other normal tasks should have
the same priority. Task chosen to be run is executed on passive level,
so automatically can be preempted by every interrupt. Every task has
its own private stack on which current context is saved and restored
if needed. Note that main firmware loop is task scheduled with
idle priority, so it will be executed only after every other task
is completed.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-09-06 15:51:02 +01:00
Marcin Rajwa 3e06a3569a Kconfig: add option to enable CONFIG_LP_SRAM
Choose to power ON LPSRAM banks in Kconfig menu.

Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
2019-07-30 19:29:59 +02:00
Tomasz Lauda e20dcd9ff4 spinlock: move DEBUG_LOCKS and DEBUG_LOCKS_VERBOSE to Kconfig
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-07-20 10:03:30 +02:00
Janusz Jankowski e7af08b241 kconfig: hide cavs menu if not supported
If all symbols in menu are not selectable if some
other symbol is not present, then there is no point
in showing that menu.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-13 15:32:39 +02:00
Janusz Jankowski def3e2de5d drivers: group DW configs in one Kconfig file
It is better to have company/family related features grouped.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-11 15:31:18 +02:00
Janusz Jankowski aee1b1e765 kconfig: add spdx license identifier
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Daniel Baluta 009cd7c8d5 reset: xtos: Introduce HAVE_RESET_VECTOR_ROM config option
Apollolake+/i.MX have reset vector in ROM. So far we have
used platform config symbols to tell which platforms have
the reset vector in ROM.

Anyhow, things are starting to get ugly here with more
platforms to come so we add an internal config symbol
which will be set by each each platform when needed.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-30 09:12:24 +01:00
Janusz Jankowski f0c085a404 alloc: move DEBUG_BLOCK_FREE to kconfig
We already have CONFIG_DEBUG* symbols in Kconfig,
this one is still defined in code, so it should be
moved also to Kconfig.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-29 14:29:29 +01:00
Janusz Jankowski ce104012fd kconfig: move DEBUG to the top of debug menu
It's better to have general options earlier in menuconfig
and specific options later.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-29 14:29:29 +01:00
Bartosz Kokoszko ad03e04fdf cavs: ipc: added ipc received and processed counters
I've added counters for processed and received ipc tasks.
They are dropped after trace points in memory window.

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-05-27 22:50:33 +01:00
Jakub Dabek 76306470ce kconfig: Add cores and memory sizes configurability
Signed-off-by: Jakub Dabek <jakub.dabek@linux.intel.com>
2019-04-18 12:44:29 +02:00
Tomasz Lauda 06e9a34583 dw-dma: make DMA FIFO partitioning configurable from Kconfig
Makes DMA FIFO partitioning configurable from Kconfig.
Some platforms need to set FIFO partitions before
enabling DMA controller.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Tomasz Lauda 1edaef67f4 dw-dma: set DMA suspend and drain stop from Kconfig
Makes DW-DMA stop method to be configurable from Kconfig.
Some of the platforms cannot stop DMA channel immediately,
but first need to suspend and drain FIFO.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-18 08:49:48 +01:00
Tomasz Lauda c0c8992bcd dw-dma: configure aggregated irq from Kconfig
Moves configuration of aggregated channel interrupts to
Kconfig. Currently only Apollolake has possibility
to register interrupt per channel.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 15:43:56 +02:00
Tomasz Lauda dc3b98c799 dw-dma: make HW_LLI configurable from Kconfig
Makes platform support for hardware linked list
configurable from Kconfig. HW_LLI is supported
for all cAVS platforms.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-04-16 15:43:56 +02:00
Bartosz Kokoszko 3569fa3c13 platform: make IOMUX, SPI, DW_GPIO a Kconfig option
Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
2019-03-04 17:52:36 +01:00
Daniel Baluta fb545a3684 task: Allow conditional compilation for low priority tasks
On i.MX we have only two software interrupts available. One is used
as PLATFORM_SCHEDULER_IRQ and the other one for PLATFORM_IRQ_TASK_HIGH.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-02-14 18:30:47 +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 86cd1a9ac4 kconfig: add initial Kconfig files
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00