unmap->addr[src_count] = dma_map_page(dma_chan->device->dev, dest, 0, PAGE_SIZE,
#include <linux/dma-mapping.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/memory.h>
#include <linux/of_irq.h>
#include <linux/irqdomain.h>
#include <linux/cpumask.h>
#include <linux/platform_data/dma-mv_xor.h>
static void mv_xor_issue_pending(struct dma_chan *chan);
#define to_mv_xor_chan(chan) \
container_of(chan, struct mv_xor_chan, dmachan)
#define to_mv_xor_slot(tx) \
container_of(tx, struct mv_xor_desc_slot, async_tx)
#define mv_chan_to_devp(chan) \
static void mv_desc_init(struct mv_xor_desc_slot *desc,
dma_addr_t addr, u32 byte_count,
enum dma_ctrl_flags flags)
struct mv_xor_desc *hw_desc = desc->hw_desc;
hw_desc->status = XOR_DESC_DMA_OWNED;
hw_desc->phy_next_desc = 0;
hw_desc->desc_command = (flags & DMA_PREP_INTERRUPT) ?
hw_desc->phy_dest_addr = addr;
hw_desc->byte_count = byte_count;
static void mv_desc_set_mode(struct mv_xor_desc_slot *desc)
struct mv_xor_desc *hw_desc = desc->hw_desc;
hw_desc->desc_command |= XOR_DESC_OPERATION_XOR;
hw_desc->desc_command |= XOR_DESC_OPERATION_MEMCPY;
static void mv_desc_set_next_desc(struct mv_xor_desc_slot *desc,
struct mv_xor_desc *hw_desc = desc->hw_desc;