mirror of https://github.com/thesofproject/sof.git
trace: removal trace logic when CONFIG_TRACE is not set
I've remove trace core logic from build when CONFIG_TRACE is not set with Kconfig. When driver tries to enable traces in case FW was built without tracing, FW returns error. Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
parent
e6f2b1fb35
commit
240cd39a22
|
@ -65,7 +65,9 @@ int master_core_init(struct sof *sof)
|
|||
platform_init_memmap();
|
||||
init_heap(sof);
|
||||
|
||||
#if CONFIG_TRACE
|
||||
trace_init(sof);
|
||||
#endif
|
||||
|
||||
trace_point(TRACE_BOOT_SYS_NOTE);
|
||||
init_system_notify(sof);
|
||||
|
|
|
@ -10,5 +10,9 @@ endif()
|
|||
add_local_sources(sof
|
||||
ipc.c
|
||||
handler.c
|
||||
dma-copy.c
|
||||
)
|
||||
|
||||
if (CONFIG_TRACE)
|
||||
add_local_sources(sof
|
||||
dma-copy.c)
|
||||
endif()
|
||||
|
|
|
@ -693,6 +693,7 @@ static int ipc_glb_pm_message(uint32_t header)
|
|||
}
|
||||
}
|
||||
|
||||
#if CONFIG_TRACE
|
||||
/*
|
||||
* Debug IPC Operations.
|
||||
*/
|
||||
|
@ -796,6 +797,14 @@ static int ipc_glb_debug_message(uint32_t header)
|
|||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static int ipc_glb_debug_message(uint32_t header)
|
||||
{
|
||||
/* traces are disabled - CONFIG_TRACE is not set */
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ipc_glb_gdb_debug(uint32_t header)
|
||||
{
|
||||
|
|
|
@ -8,12 +8,10 @@ add_local_sources(sof
|
|||
alloc.c
|
||||
ll_schedule.c
|
||||
notifier.c
|
||||
trace.c
|
||||
edf_schedule.c
|
||||
schedule.c
|
||||
agent.c
|
||||
interrupt.c
|
||||
dma-trace.c
|
||||
pm_runtime.c
|
||||
clk.c
|
||||
dma.c
|
||||
|
@ -21,3 +19,9 @@ add_local_sources(sof
|
|||
panic.c
|
||||
wait.c
|
||||
)
|
||||
|
||||
if (CONFIG_TRACE)
|
||||
add_local_sources(sof
|
||||
dma-trace.c
|
||||
trace.c)
|
||||
endif()
|
||||
|
|
|
@ -77,7 +77,9 @@ void panic_rewind(uint32_t p, uint32_t stack_rewind_frames,
|
|||
platform_panic(p);
|
||||
|
||||
/* flush last trace messages */
|
||||
#if CONFIG_TRACE
|
||||
trace_flush();
|
||||
#endif
|
||||
|
||||
/* and loop forever */
|
||||
while (1)
|
||||
|
|
|
@ -236,7 +236,11 @@
|
|||
|
||||
/* window 3 */
|
||||
#define SRAM_TRACE_BASE SRAM_WND_BASE
|
||||
#if CONFIG_TRACE
|
||||
#define SRAM_TRACE_SIZE 0x2000
|
||||
#else
|
||||
#define SRAM_TRACE_SIZE 0
|
||||
#endif
|
||||
|
||||
/* window 2 */
|
||||
#define SRAM_DEBUG_BASE (SRAM_TRACE_BASE + SRAM_TRACE_SIZE)
|
||||
|
|
|
@ -65,7 +65,13 @@
|
|||
|
||||
#define MAILBOX_TRACE_OFFSET \
|
||||
(MAILBOX_STREAM_SIZE + MAILBOX_STREAM_OFFSET)
|
||||
|
||||
#if CONFIG_TRACE
|
||||
#define MAILBOX_TRACE_SIZE 0x380
|
||||
#else
|
||||
#define MAILBOX_TRACE_SIZE 0x0
|
||||
#endif
|
||||
|
||||
#define MAILBOX_TRACE_BASE \
|
||||
(MAILBOX_BASE + MAILBOX_TRACE_OFFSET)
|
||||
|
||||
|
|
|
@ -289,8 +289,10 @@ int platform_init(struct sof *sof)
|
|||
dai_probe(ssp5);
|
||||
#endif
|
||||
|
||||
#if CONFIG_TRACE
|
||||
/* Initialize DMA for Trace*/
|
||||
dma_trace_init_complete(sof->dmat);
|
||||
#endif
|
||||
|
||||
/* show heap status */
|
||||
heap_trace_all(1);
|
||||
|
|
|
@ -232,7 +232,11 @@
|
|||
|
||||
/* window 3 */
|
||||
#define SRAM_TRACE_BASE (SRAM_STREAM_BASE + SRAM_STREAM_SIZE)
|
||||
#if CONFIG_TRACE
|
||||
#define SRAM_TRACE_SIZE 0x2000
|
||||
#else
|
||||
#define SRAM_TRACE_SIZE 0x0
|
||||
#endif
|
||||
|
||||
#define HP_SRAM_WIN0_BASE SRAM_SW_REG_BASE
|
||||
#define HP_SRAM_WIN0_SIZE (SRAM_SW_REG_SIZE + SRAM_OUTBOX_SIZE)
|
||||
|
|
|
@ -69,7 +69,13 @@
|
|||
|
||||
#define MAILBOX_TRACE_OFFSET \
|
||||
(MAILBOX_STREAM_SIZE + MAILBOX_STREAM_OFFSET)
|
||||
|
||||
#if CONFIG_TRACE
|
||||
#define MAILBOX_TRACE_SIZE 0x380
|
||||
#else
|
||||
#define MAILBOX_TRACE_SIZE 0x0
|
||||
#endif
|
||||
|
||||
#define MAILBOX_TRACE_BASE \
|
||||
(MAILBOX_BASE + MAILBOX_TRACE_OFFSET)
|
||||
|
||||
|
|
|
@ -247,8 +247,10 @@ int platform_init(struct sof *sof)
|
|||
return -ENODEV;
|
||||
dai_probe(ssp1);
|
||||
|
||||
#if CONFIG_TRACE
|
||||
/* Initialize DMA for Trace*/
|
||||
dma_trace_init_complete(sof->dmat);
|
||||
#endif
|
||||
|
||||
/* show heap status */
|
||||
heap_trace_all(1);
|
||||
|
|
|
@ -231,7 +231,11 @@
|
|||
|
||||
/* window 3 */
|
||||
#define SRAM_TRACE_BASE (SRAM_STREAM_BASE + SRAM_STREAM_SIZE)
|
||||
#if CONFIG_TRACE
|
||||
#define SRAM_TRACE_SIZE 0x2000
|
||||
#else
|
||||
#define SRAM_TRACE_SIZE 0x0
|
||||
#endif
|
||||
|
||||
#define HP_SRAM_WIN0_BASE SRAM_SW_REG_BASE
|
||||
#define HP_SRAM_WIN0_SIZE (SRAM_SW_REG_SIZE + SRAM_OUTBOX_SIZE)
|
||||
|
|
|
@ -531,7 +531,7 @@ int platform_init(struct sof *sof)
|
|||
ret = spi_probe(spi_dev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
#else
|
||||
#elif CONFIG_TRACE
|
||||
/* Initialize DMA for Trace*/
|
||||
dma_trace_init_complete(sof->dmat);
|
||||
#endif
|
||||
|
|
|
@ -253,7 +253,11 @@
|
|||
#define SRAM_STREAM_SIZE 0x1000
|
||||
|
||||
#define SRAM_TRACE_BASE (SRAM_STREAM_BASE + SRAM_STREAM_SIZE)
|
||||
#if CONFIG_TRACE
|
||||
#define SRAM_TRACE_SIZE 0x1000
|
||||
#else
|
||||
#define SRAM_TRACE_SIZE 0x0
|
||||
#endif
|
||||
|
||||
/* Suecreek HPSRAM does not have SW_REG window*/
|
||||
#define SRAM_SW_REG_BASE 0
|
||||
|
|
Loading…
Reference in New Issue