]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: xilinx_dma: Introduce helper macro for preparing dma address
authorRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Sat, 29 Sep 2018 17:17:59 +0000 (11:17 -0600)
committerVinod Koul <vkoul@kernel.org>
Sun, 11 Nov 2018 10:33:30 +0000 (16:03 +0530)
This patch introduces the xilinx_prep_dma_addr_t macro which prepares
dma_addr_t from hardware buffer descriptor LSB and MSB fields. It will
be used in simple dma 64-bit programming sequence.

Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xilinx_dma.c

index 06d1632ff1a29befd5c8e34001901b0e51635ef1..153ca584eba5967539ec6da69d2e1506815d575e 100644 (file)
 /* AXI CDMA Specific Masks */
 #define XILINX_CDMA_CR_SGMODE          BIT(3)
 
+#define xilinx_prep_dma_addr_t(addr)   \
+       ((dma_addr_t)((u64)addr##_##msb << 32 | (addr)))
 /**
  * struct xilinx_vdma_desc_hw - Hardware Descriptor
  * @next_desc: Next Descriptor Pointer @0x00