diff --git a/src/arch/xtensa/smp/init.c b/src/arch/xtensa/smp/init.c index 04f655b8c..ccdb547de 100644 --- a/src/arch/xtensa/smp/init.c +++ b/src/arch/xtensa/smp/init.c @@ -98,6 +98,7 @@ int slave_core_init(struct sof *sof) init_system_notify(sof); /* interrupts need to be initialized before any usage */ + trace_point(TRACE_BOOT_PLATFORM_IRQ); platform_interrupt_init(); trace_point(TRACE_BOOT_PLATFORM_SCHED); diff --git a/src/include/sof/trace.h b/src/include/sof/trace.h index e143b2b99..899c16c9c 100644 --- a/src/include/sof/trace.h +++ b/src/include/sof/trace.h @@ -41,23 +41,29 @@ /* system specific codes */ #define TRACE_BOOT_SYS_HEAP (TRACE_BOOT_SYS + 0x100) +#define TRACE_BOOT_SYS_TRACES (TRACE_BOOT_SYS + 0x200) #define TRACE_BOOT_SYS_NOTIFIER (TRACE_BOOT_SYS + 0x300) #define TRACE_BOOT_SYS_POWER (TRACE_BOOT_SYS + 0x400) /* platform/device specific codes */ #define TRACE_BOOT_PLATFORM_ENTRY (TRACE_BOOT_PLATFORM + 0x100) +#define TRACE_BOOT_PLATFORM_IRQ (TRACE_BOOT_PLATFORM + 0x110) #define TRACE_BOOT_PLATFORM_MBOX (TRACE_BOOT_PLATFORM + 0x120) #define TRACE_BOOT_PLATFORM_SHIM (TRACE_BOOT_PLATFORM + 0x130) #define TRACE_BOOT_PLATFORM_PMC (TRACE_BOOT_PLATFORM + 0x140) #define TRACE_BOOT_PLATFORM_TIMER (TRACE_BOOT_PLATFORM + 0x150) #define TRACE_BOOT_PLATFORM_CLOCK (TRACE_BOOT_PLATFORM + 0x160) #define TRACE_BOOT_PLATFORM_SCHED (TRACE_BOOT_PLATFORM + 0x170) +#define TRACE_BOOT_PLATFORM_AGENT (TRACE_BOOT_PLATFORM + 0x180) #define TRACE_BOOT_PLATFORM_CPU_FREQ (TRACE_BOOT_PLATFORM + 0x190) #define TRACE_BOOT_PLATFORM_SSP_FREQ (TRACE_BOOT_PLATFORM + 0x1A0) #define TRACE_BOOT_PLATFORM_DMA (TRACE_BOOT_PLATFORM + 0x1B0) #define TRACE_BOOT_PLATFORM_IPC (TRACE_BOOT_PLATFORM + 0x1C0) #define TRACE_BOOT_PLATFORM_IDC (TRACE_BOOT_PLATFORM + 0x1D0) +#define TRACE_BOOT_PLATFORM_DAI (TRACE_BOOT_PLATFORM + 0x1E0) #define TRACE_BOOT_PLATFORM_SSP (TRACE_BOOT_PLATFORM + 0x1F0) +#define TRACE_BOOT_PLATFORM_SPI (TRACE_BOOT_PLATFORM + 0x200) +#define TRACE_BOOT_PLATFORM_DMA_TRACE (TRACE_BOOT_PLATFORM + 0x210) /* trace event classes - high 8 bits*/ #define TRACE_CLASS_IRQ (1 << 24) diff --git a/src/init/init.c b/src/init/init.c index 6bc4b35c0..9b552ab1f 100644 --- a/src/init/init.c +++ b/src/init/init.c @@ -44,6 +44,7 @@ int master_core_init(struct sof *sof) init_heap(sof); #if CONFIG_TRACE + trace_point(TRACE_BOOT_SYS_TRACES); trace_init(sof); #endif diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c index 87983e4ba..cd00fe6bf 100644 --- a/src/platform/baytrail/platform.c +++ b/src/platform/baytrail/platform.c @@ -195,6 +195,7 @@ int platform_init(struct sof *sof) scheduler_init(); /* init the system agent */ + trace_point(TRACE_BOOT_PLATFORM_AGENT); sa_init(sof); /* Set CPU to default frequency for booting */ @@ -215,6 +216,7 @@ int platform_init(struct sof *sof) trace_point(TRACE_BOOT_PLATFORM_IPC); ipc_init(sof); + trace_point(TRACE_BOOT_PLATFORM_DAI); ret = dai_init(); if (ret < 0) return -ENODEV; @@ -263,6 +265,7 @@ int platform_init(struct sof *sof) #if CONFIG_TRACE /* Initialize DMA for Trace*/ + trace_point(TRACE_BOOT_PLATFORM_DMA_TRACE); dma_trace_init_complete(sof->dmat); #endif diff --git a/src/platform/haswell/platform.c b/src/platform/haswell/platform.c index 807e1c825..b551a9857 100644 --- a/src/platform/haswell/platform.c +++ b/src/platform/haswell/platform.c @@ -186,6 +186,7 @@ int platform_init(struct sof *sof) scheduler_init(); /* init the system agent */ + trace_point(TRACE_BOOT_PLATFORM_AGENT); sa_init(sof); /* Set CPU to default frequency for booting */ @@ -206,6 +207,7 @@ int platform_init(struct sof *sof) trace_point(TRACE_BOOT_PLATFORM_IPC); ipc_init(sof); + trace_point(TRACE_BOOT_PLATFORM_DAI); ret = dai_init(); if (ret < 0) return -ENODEV; @@ -224,6 +226,7 @@ int platform_init(struct sof *sof) #if CONFIG_TRACE /* Initialize DMA for Trace*/ + trace_point(TRACE_BOOT_PLATFORM_DMA_TRACE); dma_trace_init_complete(sof->dmat); #endif diff --git a/src/platform/intel/cavs/platform.c b/src/platform/intel/cavs/platform.c index f585c7c26..8b7c5c734 100644 --- a/src/platform/intel/cavs/platform.c +++ b/src/platform/intel/cavs/platform.c @@ -387,6 +387,7 @@ int platform_init(struct sof *sof) platform_init_hw(); #endif + trace_point(TRACE_BOOT_PLATFORM_IRQ); platform_interrupt_init(); #if defined(CONFIG_MEM_WND) @@ -405,6 +406,7 @@ int platform_init(struct sof *sof) scheduler_init(); /* init the system agent */ + trace_point(TRACE_BOOT_PLATFORM_AGENT); sa_init(sof); /* Set CPU to max frequency for booting (single shim_write below) */ @@ -487,12 +489,14 @@ int platform_init(struct sof *sof) return ret; /* init DAIs */ + trace_point(TRACE_BOOT_PLATFORM_DAI); ret = dai_init(); if (ret < 0) return ret; #if defined(CONFIG_DW_SPI) /* initialize the SPI slave */ + trace_point(TRACE_BOOT_PLATFORM_SPI); spi_init(); ret = spi_install(&spi, 1); if (ret < 0) @@ -508,6 +512,7 @@ int platform_init(struct sof *sof) return ret; #elif CONFIG_TRACE /* Initialize DMA for Trace*/ + trace_point(TRACE_BOOT_PLATFORM_DMA_TRACE); dma_trace_init_complete(sof->dmat); #endif