diff --git a/src/drivers/dw/dma.c b/src/drivers/dw/dma.c index b1407c699..2e1c4ce57 100644 --- a/src/drivers/dw/dma.c +++ b/src/drivers/dw/dma.c @@ -816,7 +816,7 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel, { struct dw_dma_chan_data *dw_chan = dma_chan_get_data(channel); #if CONFIG_HW_LLI - struct dw_lli *ll_uncached = cache_to_uncache(dw_chan->lli_current); + struct dw_lli *lli = platform_dw_dma_lli_get(dw_chan->lli_current); switch (next->status) { case DMA_CB_STATUS_END: @@ -825,11 +825,11 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel, DW_CHAN_MASK(channel->index)); /* fallthrough */ default: - while (ll_uncached->ctrl_hi & DW_CTLH_DONE(1)) { - ll_uncached->ctrl_hi &= ~DW_CTLH_DONE(1); + while (lli->ctrl_hi & DW_CTLH_DONE(1)) { + lli->ctrl_hi &= ~DW_CTLH_DONE(1); dw_chan->lli_current = (struct dw_lli *)dw_chan->lli_current->llp; - ll_uncached = cache_to_uncache(dw_chan->lli_current); + lli = platform_dw_dma_lli_get(dw_chan->lli_current); } break; } diff --git a/src/platform/intel/cavs/include/cavs/drivers/dw-dma.h b/src/platform/intel/cavs/include/cavs/drivers/dw-dma.h index 030cc7e37..3e664f8ee 100644 --- a/src/platform/intel/cavs/include/cavs/drivers/dw-dma.h +++ b/src/platform/intel/cavs/include/cavs/drivers/dw-dma.h @@ -85,6 +85,11 @@ static inline void platform_dw_dma_llp_disable(struct dma *dma, shim_read(DW_CHLLPC(dma, chan)) & ~SHIM_GPDMA_CHLLPC_EN); } +static inline struct dw_lli *platform_dw_dma_lli_get(struct dw_lli *lli) +{ + return cache_to_uncache(lli); +} + #endif /* __CAVS_LIB_DW_DMA_H__ */ #else