@@ -662,7 +662,7 @@ atc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
662662 */
663663static struct dma_async_tx_descriptor *
664664atc_prep_slave_sg (struct dma_chan * chan , struct scatterlist * sgl ,
665- unsigned int sg_len , enum dma_data_direction direction ,
665+ unsigned int sg_len , enum dma_transfer_direction direction ,
666666 unsigned long flags )
667667{
668668 struct at_dma_chan * atchan = to_at_dma_chan (chan );
@@ -680,7 +680,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
680680
681681 dev_vdbg (chan2dev (chan ), "prep_slave_sg (%d): %s f0x%lx\n" ,
682682 sg_len ,
683- direction == DMA_TO_DEVICE ? "TO DEVICE" : "FROM DEVICE" ,
683+ direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE" ,
684684 flags );
685685
686686 if (unlikely (!atslave || !sg_len )) {
@@ -694,7 +694,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
694694 ctrlb = ATC_IEN ;
695695
696696 switch (direction ) {
697- case DMA_TO_DEVICE :
697+ case DMA_MEM_TO_DEV :
698698 ctrla |= ATC_DST_WIDTH (reg_width );
699699 ctrlb |= ATC_DST_ADDR_MODE_FIXED
700700 | ATC_SRC_ADDR_MODE_INCR
@@ -727,7 +727,7 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
727727 total_len += len ;
728728 }
729729 break ;
730- case DMA_FROM_DEVICE :
730+ case DMA_DEV_TO_MEM :
731731 ctrla |= ATC_SRC_WIDTH (reg_width );
732732 ctrlb |= ATC_DST_ADDR_MODE_INCR
733733 | ATC_SRC_ADDR_MODE_FIXED
@@ -789,15 +789,15 @@ atc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
789789 */
790790static int
791791atc_dma_cyclic_check_values (unsigned int reg_width , dma_addr_t buf_addr ,
792- size_t period_len , enum dma_data_direction direction )
792+ size_t period_len , enum dma_transfer_direction direction )
793793{
794794 if (period_len > (ATC_BTSIZE_MAX << reg_width ))
795795 goto err_out ;
796796 if (unlikely (period_len & ((1 << reg_width ) - 1 )))
797797 goto err_out ;
798798 if (unlikely (buf_addr & ((1 << reg_width ) - 1 )))
799799 goto err_out ;
800- if (unlikely (!(direction & (DMA_TO_DEVICE | DMA_FROM_DEVICE ))))
800+ if (unlikely (!(direction & (DMA_DEV_TO_MEM | DMA_MEM_TO_DEV ))))
801801 goto err_out ;
802802
803803 return 0 ;
@@ -812,7 +812,7 @@ atc_dma_cyclic_check_values(unsigned int reg_width, dma_addr_t buf_addr,
812812static int
813813atc_dma_cyclic_fill_desc (struct at_dma_slave * atslave , struct at_desc * desc ,
814814 unsigned int period_index , dma_addr_t buf_addr ,
815- size_t period_len , enum dma_data_direction direction )
815+ size_t period_len , enum dma_transfer_direction direction )
816816{
817817 u32 ctrla ;
818818 unsigned int reg_width = atslave -> reg_width ;
@@ -824,7 +824,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
824824 | period_len >> reg_width ;
825825
826826 switch (direction ) {
827- case DMA_TO_DEVICE :
827+ case DMA_MEM_TO_DEV :
828828 desc -> lli .saddr = buf_addr + (period_len * period_index );
829829 desc -> lli .daddr = atslave -> tx_reg ;
830830 desc -> lli .ctrla = ctrla ;
@@ -835,7 +835,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
835835 | ATC_DIF (AT_DMA_PER_IF );
836836 break ;
837837
838- case DMA_FROM_DEVICE :
838+ case DMA_DEV_TO_MEM :
839839 desc -> lli .saddr = atslave -> rx_reg ;
840840 desc -> lli .daddr = buf_addr + (period_len * period_index );
841841 desc -> lli .ctrla = ctrla ;
@@ -863,7 +863,7 @@ atc_dma_cyclic_fill_desc(struct at_dma_slave *atslave, struct at_desc *desc,
863863 */
864864static struct dma_async_tx_descriptor *
865865atc_prep_dma_cyclic (struct dma_chan * chan , dma_addr_t buf_addr , size_t buf_len ,
866- size_t period_len , enum dma_data_direction direction )
866+ size_t period_len , enum dma_transfer_direction direction )
867867{
868868 struct at_dma_chan * atchan = to_at_dma_chan (chan );
869869 struct at_dma_slave * atslave = chan -> private ;
@@ -874,7 +874,7 @@ atc_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
874874 unsigned int i ;
875875
876876 dev_vdbg (chan2dev (chan ), "prep_dma_cyclic: %s buf@0x%08x - %d (%d/%d)\n" ,
877- direction == DMA_TO_DEVICE ? "TO DEVICE" : "FROM DEVICE" ,
877+ direction == DMA_MEM_TO_DEV ? "TO DEVICE" : "FROM DEVICE" ,
878878 buf_addr ,
879879 periods , buf_len , period_len );
880880
0 commit comments