@@ -437,9 +437,6 @@ static int dw_dma_stop(struct dma_chan_data *channel)
437437 lli -> ctrl_hi &= ~DW_CTLH_DONE (1 );
438438 lli ++ ;
439439 }
440-
441- dcache_writeback_region (dw_chan -> lli ,
442- sizeof (struct dw_lli ) * channel -> desc_count );
443440#endif
444441
445442 /* disable linear link position */
@@ -557,9 +554,9 @@ static int dw_dma_set_config(struct dma_chan_data *channel,
557554 if (dw_chan -> lli )
558555 rfree (dw_chan -> lli );
559556
560- dw_chan -> lli = rballoc_align ( 0 , SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_DMA ,
561- sizeof ( struct dw_lli ) * channel -> desc_count ,
562- PLATFORM_DCACHE_ALIGN );
557+ dw_chan -> lli = rzalloc ( SOF_MEM_ZONE_RUNTIME_SHARED , 0 ,
558+ SOF_MEM_CAPS_RAM | SOF_MEM_CAPS_DMA ,
559+ sizeof ( struct dw_lli ) * channel -> desc_count );
563560 if (!dw_chan -> lli ) {
564561 tr_err (& dwdma_tr , "dw_dma_set_config(): dma %d channel %d lli alloc failed" ,
565562 channel -> dma -> plat_data .id ,
@@ -767,10 +764,6 @@ static int dw_dma_set_config(struct dma_chan_data *channel,
767764#endif
768765 }
769766
770- /* write back descriptors so DMA engine can read them directly */
771- dcache_writeback_region (dw_chan -> lli ,
772- sizeof (struct dw_lli ) * channel -> desc_count );
773-
774767 channel -> status = COMP_STATE_PREPARE ;
775768 dw_chan -> lli_current = dw_chan -> lli ;
776769
@@ -810,7 +803,7 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel,
810803#if defined __ZEPHYR__
811804 int i ;
812805#else
813- struct dw_lli * lli = platform_dw_dma_lli_get ( dw_chan -> lli_current ) ;
806+ struct dw_lli * lli = dw_chan -> lli_current ;
814807#endif
815808 switch (next -> status ) {
816809 case DMA_CB_STATUS_END :
@@ -823,20 +816,14 @@ static void dw_dma_verify_transfer(struct dma_chan_data *channel,
823816 * sure the cache is coherent between DSP and DMAC.
824817 */
825818#if defined __ZEPHYR__
826- dcache_invalidate_region (dw_chan -> lli ,
827- sizeof (struct dw_lli ) * channel -> desc_count );
828-
829819 for (i = 0 ; i < channel -> desc_count ; i ++ )
830820 dw_chan -> lli [i ].ctrl_hi &= ~DW_CTLH_DONE (1 );
831-
832- dcache_writeback_region (dw_chan -> lli ,
833- sizeof (struct dw_lli ) * channel -> desc_count );
834821#else
835822 while (lli -> ctrl_hi & DW_CTLH_DONE (1 )) {
836823 lli -> ctrl_hi &= ~DW_CTLH_DONE (1 );
837824 dw_chan -> lli_current =
838825 (struct dw_lli * )dw_chan -> lli_current -> llp ;
839- lli = platform_dw_dma_lli_get ( dw_chan -> lli_current ) ;
826+ lli = dw_chan -> lli_current ;
840827 }
841828#endif
842829 break ;
0 commit comments