]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
dmaengine: xilinx_dma: Introduce helper macro for preparing dma address
authorRadhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Wed, 6 Mar 2019 09:13:24 +0000 (14:43 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 6 Mar 2019 13:20:11 +0000 (14:20 +0100)
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>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/dma/xilinx/xilinx_dma.c

index effc463f664b1f64342f8dca8370c09e5a340433..4e5d15ab158417d27e52fe618b8a877004925341 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