Commit Graph

520 Commits

Author SHA1 Message Date
Yan Wang 1693b66bb1 Fix pointer of struct dma_trace_data.
Liam's previous patch modify the structure variable from instance to
pointer. So it is unnecessary to use "&".
This parameter of parse_page_descriptors() is "void*", so complier
doesn't find this error.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-03-01 12:42:03 +00:00
Rander Wang 28cb21b578 cnl: clk: correct it on cnl according to spec
Signed-off-by: Rander Wang <rander.wang@intel.com>
2018-02-28 09:24:49 +00:00
Liam Girdwood 760ed9df22 apl: memory: increase TEXT_SIZE by 4k
Increase APL text size by 4k to avoid segmemt collision with data.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-27 16:41:40 +00:00
Liam Girdwood 2fb2a77e2c apl: memory: fix heap system base.
Text base is from TEXT_BASE and not TEXT_START

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-27 16:40:52 +00:00
Liam Girdwood 041423bfe3 rimage: validate manifest segments
make sure no manifest segments collide with each other and fail if they
do.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-27 16:35:10 +00:00
Liam Girdwood 40664b3f7b xtensa: Don't re-register ECC parity handler.
ECC parity handler already defined in ROM so no need to re-register.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:38:30 +00:00
Liam Girdwood a7f853d894 hsw: trace: write trace point data to IPCX.
Panic uses IPCD

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:33:31 +00:00
Liam Girdwood b46d579367 hsw: use CPU clock for scheduler and work queue.
No external SSP timer on HSW/BDW so need to use CPU clock.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:33:21 +00:00
Liam Girdwood 89262b0f37 core: initialise clocks before work queue init.
Work queue depends on clocks.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:33:10 +00:00
Liam Girdwood 30cd5900cc hsw: use timer 3 for work queue
Timer 3 has highest priority.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:59 +00:00
Liam Girdwood dbc4908a5b hsw: ipc: Fix IPC handler to align with logic on BYT
Fix HSW handler so that it checks host_pending flag and aligns with
BYT IPC handler wrt trace messages.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:49 +00:00
Liam Girdwood 4930014c1b hsw: clk: allocate clk data from system pool
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:40 +00:00
Liam Girdwood 24851d2f74 ipc: dont assume DMAC0 is always used for IPC.
Refactor so other DMACs can be used for IPC purposes.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:31 +00:00
Liam Girdwood dcf2369e4a hsw: memory: Add space for mailbox in memmap.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:21 +00:00
Liam Girdwood e590c2b186 hsw: irq: Fix timer3 irq to use correct mask
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:11 +00:00
Liam Girdwood f1185734ab panic: fill stack space with frames.
Fill all available stack dump space with frames if available and update
any panic code to include passed value.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:32:01 +00:00
Liam Girdwood 36e425e2e5 dma-trace: move to earlier initialisation point
Initialise DMA trace prior to platform initialisation so that more users
may use trace as part of init.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

dma trace fix
2018-02-26 19:31:51 +00:00
Liam Girdwood a23e246286 debug: return new panic code if stack is smashed.
Change the panic code is stack has been smashed. This allows platform
specific handlers to send new panic code to host if stack is smashed.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:30:37 +00:00
Liam Girdwood c38eb34669 scripts: add script to build rimage
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:30:25 +00:00
Liam Girdwood bbad6ec982 debug: stack: fix stack dump lower limit.
Don't try and dump data outside of the stack.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:30:13 +00:00
Liam Girdwood bcb8b1abeb cache: bdw: cache writeback/invalidate not needed on HSW/BDW
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-26 19:30:01 +00:00
Ranjani Sridharan b5ca5c495d scripts: modified build-all script for xtensa platforms
This patch modifies the build-all script for xtensa platforms
to make it easier to choose platforms

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-02-26 19:23:56 +00:00
Keyon Jie bd01001674 timer: fix external timer doesn't work issue for APL/CNL
On some platforms(e.g. APL, CNL), the external timer(wall clock)
uses the external interrupt bits, here change the common timer
logic to call interrupt APIs, which give a chance to handle for
different cases.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-23 09:54:47 +00:00
Pan Xiuli d5b8df4211 rimage: add unsigned firmware support
Add unsigned firmware support, that can directly use the FW or sign it
with other tools.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-02-23 08:23:56 +00:00
Liam Girdwood 884c489e80 hsw: shim: fix IPCD size to 32bit
fix IPCD data to be 32bit like the HW

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:52:43 +00:00
Liam Girdwood 9d5c466380 rimage: fix elf section collision detection.
Section end was not checked. Now fixed. Added more error output to
identify.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:52:10 +00:00
Liam Girdwood 8a76994b10 mailbox: use FW "register" window for exceptions and stack dumps
This window is always available at all boot stages hence is ideal for
exception data.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:51:58 +00:00
Liam Girdwood e52ce68347 panic: Improve panic reporting to include DSP regs and stack dump
Improve the output from panic to include DSP registers and stack dump.
Export panic codes to UAPI for host driver logging.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:51:54 +00:00
Liam Girdwood f09ce2a6a0 rimage: elf: validate module sections internally.
Make sure we validate all module sections against each other.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:50:03 +00:00
Liam Girdwood 7c0557faae sram: registers: Fix panic so ROM status is not clobbered.
Make sure we dont over write any ROM status and move "register" macros
into memory.h.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:49:50 +00:00
Liam Girdwood 33baaf2c27 apl: platform: remove platform_ext_timer as it's already declared
Already declared in the platform timer queue data so reuse.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:49:37 +00:00
Liam Girdwood 3056ce5de4 apl: clk: clock data to be allocated in system heap.
Fix clock data to be allocated in the system heap like other
system init data.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:49:23 +00:00
Liam Girdwood ed14595001 hsw: fix heap buffer size so it doesnt overwrite stack
buffer heap overflowed. Fix.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-22 16:49:23 +00:00
Seppo Ingalsuo 529da2cea1 BYT memory: Fix calculation of HEAP_BUFFER_SIZE
This patch fixes the overlap between heap buffer and stack. The macro
for calculation missed the data size that caused heap to become too large.
Compilation of sof with xt-xcc triggers this issue in rimage and causes
image build fail.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-02-22 16:49:22 +00:00
Seppo Ingalsuo 1b0cb08896 Pipeline: Compilation fix for xt-xcc compiler
The xt-xcc compiler does not accept NULL as return value from an int
function.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-02-22 16:49:22 +00:00
Tomasz Lauda 34eee5e585 cnl: Add missing host and link DMA init
CONFIG_DMA_GW is set for Cannonlake, so add host and link initialization to avoid FW crash.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-02-22 16:49:22 +00:00
Tomasz Lauda 0172f2bb53 cnl: clock: Fix the referencing out of bounds clock
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-02-22 16:44:03 +00:00
Tomasz Lauda 9d3c67e1a0 cnl: linker: Correct platform name in CNL linker script
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2018-02-22 16:44:03 +00:00
Liam Girdwood 05ef4343d1 rimage: import rimage image creation and signing tool
rimage is being moved from tools repo to sof repo since there is now a
cyclic dependency between both repos and sof needs rimage for it's
build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 20:29:40 +00:00
Liam Girdwood bf3c0f25d9 audio: host: move gateway code into less condition statements
Reduce the number of conditional build statements for gateway by moving
gateway code into fewer conditional build sections.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 15:44:56 +00:00
Liam Girdwood 511d8c0b97 hda: dma: minor cleanup of newlines
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 14:32:03 +00:00
Liam Girdwood 32b399c051 dai: fix spelling.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-12 15:51:20 +00:00
Pan Xiuli 62cfeadb4e sof: buffer: add spin lock for buffer consume/produce
We may have irq to modify buffer when are modifing the buffer.
Add the spin lock to make modify atomic.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-02-12 15:48:31 +00:00
Ranjani Sridharan 43e86cab60 volume: fix logic for volume mute/unmute
This patch fixes the volume mute/unmute logic in volume
to handle cases when volume is already muted/unmuted

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-02-12 15:46:21 +00:00
Liam Girdwood d6426bc305 buffer: make sure we clear buffer contents during reset.
buffer contents were not being cleared on stream reset. Fix.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-09 16:27:55 +00:00
Keyon Jie bad1261098 host: fix playback failed from second time issue
For host with gateway, we need create extra dma_sg_elem *
period_count for hd->config.element_list, and free them
at host_reset() time, otherwise, the hd->local elements
may be broken if we use them for config.element_list.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-09 12:30:01 +00:00
Liam Girdwood b0f8e5d5c2 dma: dw-dma: use 32 bit words for non peripheral copies.
DW-DMA is more optimal using 32bit data size when transferring between
memories. Set configuration to always use 32 bit mode for non peripheral
copies from memory to memory.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-09 12:29:08 +00:00
Keyon Jie 1532dfdad4 apl-ssp: use external clock for APL at the moment
We only enable external Audio Cardinal 24.576MHz clock for SSP
at the moment.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-02-09 12:23:35 +00:00
Rander Wang 1edc69c7c0 dma: dw-dma: refine GPDMA on CNL
All GPDMA share the same irq on cannonlake, this is different with
appololake.The change is:probe GPDMA array when initilized, set the
array to the irq function; check the interrupt status of GPDMA array
in irq function, process the correct GPDMA that produces interrupt.

Signed-off-by: Rander Wang <rander.wang@intel.com>
2018-02-09 08:49:07 +00:00
Rander Wang 019637ab25 ipc: return msg to empty list
DSP and host communicate each other with msg. It would
exhausted without return and make ipc failed
2018-02-08 20:23:47 +00:00