[Sound-open-firmware] [PATCH v2] Move DMA tracing intialization calling.

yan.wang at linux.intel.com yan.wang at linux.intel.com
Wed Nov 8 10:45:02 CET 2017


From: Yan Wang <yan.wang at linux.intel.com>

Move it from ipc handler into platform_init().
It should be placed after IPC and DMAC initialization.

Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
 src/ipc/intel-ipc.c              | 7 -------
 src/platform/baytrail/platform.c | 4 ++++
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c
index 63c84df..1df88c4 100644
--- a/src/ipc/intel-ipc.c
+++ b/src/ipc/intel-ipc.c
@@ -583,13 +583,6 @@ static int ipc_dma_trace_config(uint32_t header)
 
 	trace_ipc_error("DA1");
 
-	/* Initialize DMA for Trace*/
-	err = dma_trace_init(&_ipc->dmat);
-	if (err < 0) {
-		trace_ipc_error("eIP");
-		goto error;
-	}
-
 	/* use DMA to read in compressed page table ringbuffer from host */
 	err = get_page_descriptors(iipc, &params->buffer);
 	if (err < 0) {
diff --git a/src/platform/baytrail/platform.c b/src/platform/baytrail/platform.c
index c175a1b..3517e0b 100644
--- a/src/platform/baytrail/platform.c
+++ b/src/platform/baytrail/platform.c
@@ -46,6 +46,7 @@
 #include <reef/clock.h>
 #include <reef/ipc.h>
 #include <reef/trace.h>
+#include <reef/dma-trace.h>
 #include <reef/audio/component.h>
 #include <config.h>
 #include <string.h>
@@ -357,5 +358,8 @@ int platform_init(struct reef *reef)
 	dai_probe(ssp5);
 #endif
 
+	/* Initialize DMA for Trace*/
+	dma_trace_init(&reef->ipc->dmat);
+
 	return 0;
 }
-- 
2.7.4



More information about the Sound-open-firmware mailing list