Commit Graph

741 Commits

Author SHA1 Message Date
Keyon Jie 3e24ac8e9f hda-dma: fix src_width and dest_width for 32 bit container case
The src_width and dest_width are configured already in Bytes,
here fix it, otherwise 24/32 bit copying with hda-dma may have
problem.

Reported-by: Zhigang Wu <zhigang.wu@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-07 11:01:10 +00:00
Rander Wang 680798071e cnl: ssp: fix DSP_B setting in ssp
set ssp according to DSP_B spec

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-03-07 09:35:50 +00:00
Rander Wang 0857b21acb cnl: dma: refine dma probe
Probe each dma individually
2018-03-07 09:33:34 +00:00
Pierre-Louis Bossart 1a784a9311 platform: cnl: fix clock settings
25MHz is not supported, use 24MHz

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-07 09:06:11 +00:00
Pierre-Louis Bossart fafb515277 clk: fix CNL clk allocation
All other platforms use RZONE_SYS, not sure why CannonLake
should be any different.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-07 09:06:11 +00:00
Pierre-Louis Bossart 7ee7d1f723 clk: fix ApolloLake SSP clock values
24.576, not 24.0 MHz

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-03-07 09:06:11 +00:00
Keyon Jie 77ed88aa4a hda-dma: fix configure direction wrong issue
The directions configured in sg_elem are actually dma transfer type,
not playback/capture direction, here correct them.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-06 21:41:50 +00:00
Keyon Jie 59c57d05cb host: host-gw: only check first_copy for playback
For capture, we don't need produce empty bytes, here add
check to fix capture can't start issue.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-03-06 21:41:40 +00:00
Liam Girdwood c4492e48b7 dma-trace: fix DMA trace buffer must be DMA-able memory
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-06 15:18:37 +00:00
Liam Girdwood 1376a81f31 apl: probe all SSP ports in platform init
Fix. We must probe all our SSP ports in platform init.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-06 15:01:24 +00:00
Liam Girdwood 5972ac363d alloc: rmalloc must check other zones/pools for capabilities
rmalloc should also check the buffer heap if no capable memory can be
found in the runtime heap.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-06 14:15:32 +00:00
Pan Xiuli e92ef97834 ipc: replace ipc position update with memory window
Add memeory window for stream region. And position offset binding for
component. Replace IPC position update with memory window update.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-05 14:50:55 +00:00
Pan Xiuli aa562f81ba platform: add stream region into sof_ipc_window
Add stream region memory window into sof_ipc_window used for position
update.
For APL and CNL, we got a 1 page space for stream region.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-05 14:49:57 +00:00
Pan Xiuli be610d53f9 platform: add sof_ipc_window for byt, hsw and bdw
Add sof_ipc_window for all platforms, and add IPC send after boot
compelted. Also remove the deprecated ready window.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-05 14:49:46 +00:00
Liam Girdwood 1f6aee5a39 memory: allocator: Remove RFLAGS_NONE/USED and use caps
Dont use RFLAGS_NONE, but use the new memory capabilities flags instead.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 14:49:35 +00:00
Liam Girdwood c760f83100 memory: allocator: Add support for different memory types and mappings
Currently memory heap pools are statically defined in the allocator core
and don't define the capabilities of the memory in each pool.

This patch adds support for different memory capabilities so that users
can allocate memory that complies with any capability requirements for
requested memory.

The patch also moves the memory heap pool mappings to platform specific
code so that platforms can define their own mappings, support multiple
mappings and can move the mappings into different physical memory areas.
mappings

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 14:49:15 +00:00
Liam Girdwood 3ef88cf994 alloc: add sanity check for malformed images.
Add a sanity check to make sure that data/rodata contains expected values
otherwise this can cause unpredictable behaviour that is difficult to
later diagnose.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-05 14:49:04 +00:00
Yan Wang fc7dcbf141 ipc: Remove "void*" pointer of parse_page_descriptors().
Compiler cannot check the real type of "void*" pointer.
It is easy to cause pointer conversion error.
So use the pointer of element list of struct dma_sg_elem instead
of void* pointer.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-03-02 09:25:11 +00:00
Pan Xiuli 3943df6f45 rimage: read the fixup text size form ELF
The actual text size will change and the hard code base_fw_text_size_fixup
could not fit the changing size. We should get the fixup size from the
module info just from the memory mapping.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-02 09:06:30 +00:00
Pan Xiuli 6fe22aa929 apl: Add text size in module info
Add total text size we used in memory mapping into module info to
help rimage build the right FW binary.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-02 09:06:30 +00:00
Rander Wang f8126f09e4 cnl: dma: fix playback failed at second time
Stop dma at the end of playback, or next time dma
is not available for playback
2018-03-02 09:03:27 +00:00
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