From: Yan Wang yan.wang@linux.intel.com
It will use DMA trace class and global DMA trace API.
Signed-off-by: Yan Wang yan.wang@linux.intel.com --- Test with: CNL nocodec SOF master: c1f2682c210201bbbc96fce7b382b25b90d19775 SOF-Tool master: 86fe688a2b4f68a1ce87e0951686be12a00f1a3c https://github.com/plbossart/sound/tree/topic/sof-v4.14: d09db67c5a9d6dfc85f700669fa2e43c678c8d51 --- src/drivers/dw-dma.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index e0fbc5f..e236463 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -232,9 +232,16 @@ #endif
/* tracing */ -#define trace_dma(__e) trace_event(TRACE_CLASS_DMA, __e) -#define trace_dma_error(__e) trace_error(TRACE_CLASS_DMA, __e) -#define tracev_dma(__e) tracev_event(TRACE_CLASS_DMA, __e) +#define trace_dma(__e) \ + trace_global_event(NORMAL_LEVEL, TRACE_CLASS_DMA, __e) +#define tracev_dma(__e) \ + trace_global_event(VERBOSE_LEVEL, TRACE_CLASS_DMA, __e) +#define trace_dma_error(__e) \ + trace_global_event(ERROR_LEVEL, TRACE_CLASS_DMA, __e) +#define trace_dma_value(x) \ + trace_global_value(NORMAL_LEVEL, x) +#define trace_dma_error_value(x) \ + trace_global_value(ERROR_LEVEL, x)
/* HW Linked list support, only enabled for APL/CNL at the moment */ #if defined CONFIG_APOLLOLAKE || defined CONFIG_CANNONLAKE @@ -374,9 +381,9 @@ static int dw_dma_start(struct dma *dma, int channel) (dw_read(dma, DW_DMA_CHAN_EN) & (0x1 << channel))) { ret = -EBUSY; trace_dma_error("eS0"); - trace_error_value(dw_read(dma, DW_DMA_CHAN_EN)); - trace_error_value(dw_read(dma, DW_CFG_LOW(channel))); - trace_error_value(p->chan[channel].status); + trace_dma_error_value(dw_read(dma, DW_DMA_CHAN_EN)); + trace_dma_error_value(dw_read(dma, DW_CFG_LOW(channel))); + trace_dma_error_value(p->chan[channel].status); goto out; }
@@ -484,7 +491,7 @@ static int dw_dma_stop(struct dma *dma, int channel) /* is channel stii active ? */ if ((dw_read(dma, DW_DMA_CHAN_EN) & (0x1 << channel))) { trace_dma_error("ea0"); - trace_error_value(channel); + trace_dma_error_value(channel); }
p->chan[channel].status = COMP_STATE_PREPARE; @@ -916,7 +923,7 @@ static void dw_dma_irq_handler(void *data) status_intr = dw_read(dma, DW_INTR_STATUS); if (!status_intr) { trace_dma_error("eDI"); - trace_error_value(status_intr); + trace_dma_error_value(status_intr); }
tracev_dma("irq"); @@ -1082,7 +1089,7 @@ static void dw_dma_irq_handler(void *data) status_block_new = dw_read(dma, DW_STATUS_BLOCK); if (status_block_new) { trace_dma_error("eI2"); - trace_error_value(status_block_new); + trace_dma_error_value(status_block_new); }
for (i = 0; i < DW_MAX_CHAN; i++) {