[Sound-open-firmware] [PATCH v3 6/6] dma: trace: dma_copy_new() does not need DMAC ID anymore

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Sat Jun 9 00:18:31 CEST 2018


Update dma_copy_new() to be compatible with dma_get(). Remove the DMAC
ID argument and the corresponding PLATFORM_TRACE_DMAC definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
 src/include/sof/dma.h                               | 2 +-
 src/ipc/dma-copy.c                                  | 2 +-
 src/lib/dma-trace.c                                 | 2 +-
 src/platform/apollolake/include/platform/platform.h | 3 ---
 src/platform/baytrail/include/platform/platform.h   | 3 ---
 src/platform/cannonlake/include/platform/platform.h | 3 ---
 src/platform/haswell/include/platform/platform.h    | 3 ---
 7 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/include/sof/dma.h b/src/include/sof/dma.h
index cef5e02..f285ba0 100644
--- a/src/include/sof/dma.h
+++ b/src/include/sof/dma.h
@@ -283,7 +283,7 @@ struct dma_copy {
 };
 
 /* init dma copy context */
-int dma_copy_new(struct dma_copy *dc, int dmac);
+int dma_copy_new(struct dma_copy *dc);
 
 /* free dma copy context resources */
 static inline void dma_copy_free(struct dma_copy *dc)
diff --git a/src/ipc/dma-copy.c b/src/ipc/dma-copy.c
index 25f891c..2efee68 100644
--- a/src/ipc/dma-copy.c
+++ b/src/ipc/dma-copy.c
@@ -373,7 +373,7 @@ int dma_copy_from_host_nowait(struct dma_copy *dc, struct dma_sg_config *host_sg
 	return local_sg_elem.size;
 }
 
-int dma_copy_new(struct dma_copy *dc, int dmac)
+int dma_copy_new(struct dma_copy *dc)
 {
 	uint32_t dma_cap;
 
diff --git a/src/lib/dma-trace.c b/src/lib/dma-trace.c
index 01a9925..cff9171 100644
--- a/src/lib/dma-trace.c
+++ b/src/lib/dma-trace.c
@@ -180,7 +180,7 @@ int dma_trace_init_complete(struct dma_trace_data *d)
 	trace_buffer("dtn");
 
 	/* init DMA copy context */
-	ret = dma_copy_new(&d->dc, PLATFORM_TRACE_DMAC);
+	ret = dma_copy_new(&d->dc);
 	if (ret < 0) {
 		trace_buffer_error("edm");
 		rfree(buffer->addr);
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h
index 1321f1f..eeb5927 100644
--- a/src/platform/apollolake/include/platform/platform.h
+++ b/src/platform/apollolake/include/platform/platform.h
@@ -105,9 +105,6 @@ struct sof;
  */
 #define DMA_TRACE_RESCHEDULE_TIME	5000
 
-/* DMAC used for trace DMA */
-#define PLATFORM_TRACE_DMAC	DMA_HOST_IN_DMAC
-
 /* DSP should be idle in this time frame */
 #define PLATFORM_IDLE_TIME	750000
 
diff --git a/src/platform/baytrail/include/platform/platform.h b/src/platform/baytrail/include/platform/platform.h
index 1defe27..b860356 100644
--- a/src/platform/baytrail/include/platform/platform.h
+++ b/src/platform/baytrail/include/platform/platform.h
@@ -96,9 +96,6 @@ struct sof;
  */
 #define DMA_TRACE_RESCHEDULE_TIME	5000
 
-/* DMAC used for trace DMA */
-#define PLATFORM_TRACE_DMAC	DMA_ID_DMAC0
-
 /* DSP should be idle in this time frame */
 #define PLATFORM_IDLE_TIME	750000
 
diff --git a/src/platform/cannonlake/include/platform/platform.h b/src/platform/cannonlake/include/platform/platform.h
index c7d4a82..a5d28cf 100644
--- a/src/platform/cannonlake/include/platform/platform.h
+++ b/src/platform/cannonlake/include/platform/platform.h
@@ -111,9 +111,6 @@ struct sof;
  */
 #define DMA_TRACE_RESCHEDULE_TIME	5000
 
-/* DMAC used for trace DMA */
-#define PLATFORM_TRACE_DMAC	DMA_HOST_IN_DMAC
-
 /* DSP should be idle in this time frame */
 #define PLATFORM_IDLE_TIME	750000
 
diff --git a/src/platform/haswell/include/platform/platform.h b/src/platform/haswell/include/platform/platform.h
index c5d8187..c2b9a4c 100644
--- a/src/platform/haswell/include/platform/platform.h
+++ b/src/platform/haswell/include/platform/platform.h
@@ -95,9 +95,6 @@ struct sof;
  */
 #define DMA_TRACE_RESCHEDULE_TIME	5000
 
-/* DMAC used for trace DMA */
-#define PLATFORM_TRACE_DMAC	DMA_ID_DMAC1
-
 /* DSP should be idle in this time frame */
 #define PLATFORM_IDLE_TIME	750000
 
-- 
2.17.1



More information about the Sound-open-firmware mailing list