Commit Graph

437 Commits

Author SHA1 Message Date
Liam Girdwood 2104ff80d4 trace: add gaps in macros for new items
Add gaps in the platform init tarce macros to allow other items to be
inserted.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Rander Wang a86d2d7ae2 io: Add support for 16bit register IO
Enable IO with 16 bit HW.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 2b5507232e drv: dw-dma: Add support for apollolake and cannonlake platforms.
Apollolake and Cannonlake have some register differences in DW-DMA HW.
Add macros to support those differences.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 5481482557 build: xtensa: fix build link order for all platforms.
Some platforms had unresolved symbols when platform was linked before
core. Fix that.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 4814b98146 uapi: manifest: Add UAPI for Intel firmware manifest
Add uapi header for Intel manifest based firmware file format.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood cc9fba353e build: configure: make sure we can include C headers in assembly
Set ASSEMBLY when we are building .S files so that C headers can
be included.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 9053e0455f ipc: trace: dma_trace cant use page tables on APL/CNL
Page tables are not used by DMA trace on CNL and APL. Make sure they
are not built in.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 46f1220ddc arch: xtensa: Support wait_for_interrupt on LX6
Add LX6 version of wait_for_interrupt() as this will be needed for
cannonlake.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Keyon Jie cfdfb8129f core: irq: Add support for nested interrupts.
Allow interrupts to have a parent and child relationship in order to
support nested interrupts between different HW interrupt controllers.

This patch allows child handler to be registered for secondary interrupt
controllers and allow multiple child interrupt sources to share a single
interrupt pin.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood efff610a50 hsw: don't include pmc header.
Not used on Haswell or Broadwell.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood 42460843ad platform: byt: move DW-DMA specific headers into DMA driver.
Lets keep all the DW-DMA register/bits in one place.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-23 16:15:51 +00:00
Liam Girdwood f198ad907c platform: hsw: Add build support for haswell and broadwell
Add build support Makefiles

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Liam Girdwood b5d3e7748d ipc: hsw: Add IPC support for haswell and broadwell
Add IPC support for Haswell and Broadwell platforms.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Liam Girdwood ab15603984 dma: dw-dma: Add register macros macro for haswell and broadwell
Haswell and Broadwell have some differences with some DMA registers.
Add macros for these bits.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Liam Girdwood c025039d8f platform: hsw: Add platform support drivers for haswell and broadwell
Add platform support drivers an initialisation for Haswell and Broadwell.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Liam Girdwood 495e5d2835 platform: hsw: Add platform headers for haswell and broadwell
Add SOF platform headers for Haswell and Broadwell

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Liam Girdwood 21839fc028 platform: hsw: Add xtensa headers for haswell and broadwell
Add xtensa headers for Haswell and Broadwell.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-22 12:25:12 +00:00
Pierre-Louis Bossart 97e4232f7f trace: don't copy uninitialized field from dma_sw_elem parameter
Coverity issue: 254842 Uninitialized scalar variable
The variable will contain an arbitrary value left from earlier
computations.

In parse_page_descriptors: Use of an uninitialized variable (CWE-457)
The elem.src variable is not initialized, but in
dma_trace_host_buffer() the code reads this initialized value.

Break

	*e = *elem;

in
	e->dest = elem->dest;
	e->size = elem->size;

to only access relevant fields.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-01-22 12:25:12 +00:00
Ranjani Sridharan 8440ec3f18 host/dai: update pointer cast to support 64-bit library build
This patch updates the pointer cast in host/dai for library build
support for 64-bit arch

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-01-19 09:28:59 +00:00
Pierre-Louis Bossart 61b4a160af dai: add fall through comment in switch case
Explicitly comment that the fall through in a switch case is not
a typo to make Coverity warnings go away.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-01-19 09:13:52 +00:00
Keyon Jie d7706c84c0 host: set host_size in params()
We don't need set host buffer size in each sg_elem, instead,
we can set it only one time, here set it in params().

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-01-19 09:07:26 +00:00
Liam Girdwood 5383104f36 build: dist: make sure agent.h is added to make dist.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-11 15:21:49 +00:00
Liam Girdwood ac3f2e9399 Merge branch '1.0-stable' 2018-01-11 14:59:52 +00:00
Liam Girdwood 83fec15597 build: fix version script to use correct version in tarball build
make sure the tarball build and worktree build uses the correct version.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-11 14:58:08 +00:00
Liam Girdwood fb1f18c135 Merge tag 'v1.0.1'
v1.0.1
2018-01-11 11:40:21 +00:00
Liam Girdwood 6bb3783952 build: fix package name to sof
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-10 20:43:25 +00:00
Liam Girdwood 93d62e595e build: version Add micro version to supporting versioning stable releases
Currently SOF is version as x.y. Add a z so that the version is x.y.z and
can represent different stable versions.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-10 20:26:08 +00:00
Liam Girdwood b14e852bbe build: fix install and dist build targets.
Make install/dist were missing some headers files and dirs. Add them and
make sure version generation works for building from the dist directory
where there is no git versioning information available.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-01-10 17:36:41 +00:00
Liam Girdwood 8c7108ae82 Merge branch '1.0-stable' 2017-12-22 16:04:34 +00:00
Keyon Jie 1a8a653af8 dma-trace: add build condition for dma trace
Only compile dma-trace.c when BUILD_DMA_TRACE is true.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Acked-by: Yan Wang <yan.wang@linux.intel.com>
2017-12-22 15:59:47 +00:00
Keyon Jie 3318a16455 trace: do dma trace when CONFIG_DMA_TRACE is selected
CONFIG_DMA_TRACE is selected by default. But we should
not do dma trace when CONFIG_DMA_TRACE is not selected
(--disable-dma-trace is added to configure command line),
here add this judgement to fix compiling issue for that
dma trace is not selected.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Acked-by: Yan Wang <yan.wang@linux.intel.com>
2017-12-22 15:53:37 +00:00
Liam Girdwood c14a4e97f1 comp: pause: Make sure dai/host state are preserved during pause/resume
The DAI and host components states must be preserved during pause so that
when normal pipeline positions are used on resume. i.e. pause just looks
like a very long pipeline schedule.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-22 14:33:23 +00:00
Liam Girdwood a9e1b6c673 trace: dont resend old buffers if trace buffer overflows
The circular trace buffer can overflow if too much trace data is sent
before it can schedule a DMA copy to flush the data. This overflow
causes the avail bytes counter to be greater than the buffer size and
means the DMA copy is rescheduled until avail is 0 (repeating old data).

Fix this by resetting avail to 0 when we overflow.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-22 13:29:46 +00:00
Liam Girdwood 5277acbfe1 comp: pause: Make sure dai/host state are preserved during pause/resume
The DAI and host components states must be preserved during pause so that
when normal pipeline positions are used on resume. i.e. pause just looks
like a very long pipeline schedule.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 22:09:13 +00:00
Liam Girdwood 0c9e55b6da panic: fix panic_dump_stack()
Fix so that dump stack does not overwrite any debug data and does not
read past the end of the stack.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 21:07:24 +00:00
Liam Girdwood bc73899f9a arch: add API call to get stack current pointer.
Return the current stack pointer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 21:07:24 +00:00
Liam Girdwood cb6c5fd669 platform: Add a platform workQ clock source macro
Add this macro at platform level so it can be used by others.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 21:07:24 +00:00
Liam Girdwood b7bcd47085 baytrail: panic: fix panic on baytrail.
Simplify and fix panic output on baytrail.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 21:07:24 +00:00
Liam Girdwood cf3221b362 agent: integrate system agent into idle loop.
Initialise the SA during platform init and then notify SA of idle in the
main audio loop.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 17:17:26 +00:00
Liam Girdwood d163f6d970 agent: Add initial system monitoring agent.
Add a simple system monitoring agent that can detect when FW does not
execute correctly. The assumption is that FW will always idle from time
to time and this idling can be monitored by the SA. The FW wont idle if
it's thrashing, continually interrupted, continually running work or
continually rescheduling a task.

The SA will emit trace and panic if idle is not entered for a specific time
period.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 17:17:26 +00:00
Liam Girdwood 8334c554fa panic: fix panic_dump_stack()
Fix so that dump stack does not overwrite any debug data and does not
read past the end of the stack.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 17:17:26 +00:00
Liam Girdwood d1c61576a5 arch: add API call to get stack current pointer.
Return the current stack pointer.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 16:50:18 +00:00
Liam Girdwood 141f972672 platform: Add a platform workQ clock source macro
Add this macro at platform level so it can be used by others.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 16:19:52 +00:00
Liam Girdwood 4335929c8b baytrail: panic: fix panic on baytrail.
Simplify and fix panic output on baytrail.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2017-12-21 16:14:58 +00:00
Seppo Ingalsuo ece72b5e1a Volume: Code cleanup for minimum gain value limiting
This patch changes the condition for limiting the smallest gain to
eliminate a never executed code part when VOL_MIN is defined as zero. The
variable v is unsigned integer so less than zero is not possible.
The functionality is not modified by this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-12-20 10:07:56 +00:00
Seppo Ingalsuo 33b144d2fe Volume: Code cleanup for minimum gain value limiting
This patch changes the condition for limiting the smallest gain to
eliminate a never executed code part when VOL_MIN is defined as zero. The
variable v is unsigned integer so less than zero is not possible.
The functionality is not modified by this patch.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2017-12-20 10:07:25 +00:00
Yan Wang 53976e4c38 Change type of size in trace_work() callback from uint32_t to int32_t.
This variable is set by the return value of dma_copy_to_host_nowait().
Unsigned type will mislead error checking.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2017-12-20 09:09:10 +00:00
Yan Wang b7cd6ac667 Change type of size in trace_work() callback from uint32_t to int32_t.
This variable is set by the return value of dma_copy_to_host_nowait().
Unsigned type will mislead error checking.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2017-12-20 09:08:57 +00:00
Liam Girdwood bd220b212f lock: Add deadlock detection.
Add a debug option that can detect deadlock and panic(). The deadlock
detection attempts to acquire a lock several times before giving up
and causing a panic() taht dumps the  deadlock details.

Signed-off-by: Liam Girdwwod <liam.r.girdwood@linux.intel.com>
2017-12-19 19:51:47 +00:00
Liam Girdwood 24ff686d9e lock: Add deadlock detection.
Add a debug option that can detect deadlock and panic(). The deadlock
detection attempts to acquire a lock several times before giving up
and causing a panic() taht dumps the  deadlock details.

Signed-off-by: Liam Girdwwod <liam.r.girdwood@linux.intel.com>
2017-12-19 19:51:11 +00:00