#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_dma.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/types.h>
#include "virt-dma.h"
#define UNIPHIER_MDMAC_CMD …
#define UNIPHIER_MDMAC_CMD_ABORT …
#define UNIPHIER_MDMAC_CH_OFFSET …
#define UNIPHIER_MDMAC_CH_STRIDE …
#define UNIPHIER_MDMAC_CH_IRQ_STAT …
#define UNIPHIER_MDMAC_CH_IRQ_REQ …
#define UNIPHIER_MDMAC_CH_IRQ_EN …
#define UNIPHIER_MDMAC_CH_IRQ_DET …
#define UNIPHIER_MDMAC_CH_IRQ__ABORT …
#define UNIPHIER_MDMAC_CH_IRQ__DONE …
#define UNIPHIER_MDMAC_CH_SRC_MODE …
#define UNIPHIER_MDMAC_CH_DEST_MODE …
#define UNIPHIER_MDMAC_CH_MODE__ADDR_INC …
#define UNIPHIER_MDMAC_CH_MODE__ADDR_DEC …
#define UNIPHIER_MDMAC_CH_MODE__ADDR_FIXED …
#define UNIPHIER_MDMAC_CH_SRC_ADDR …
#define UNIPHIER_MDMAC_CH_DEST_ADDR …
#define UNIPHIER_MDMAC_CH_SIZE …
#define UNIPHIER_MDMAC_SLAVE_BUSWIDTHS …
struct uniphier_mdmac_desc { … };
struct uniphier_mdmac_chan { … };
struct uniphier_mdmac_device { … };
static struct uniphier_mdmac_chan *
to_uniphier_mdmac_chan(struct virt_dma_chan *vc)
{ … }
static struct uniphier_mdmac_desc *
to_uniphier_mdmac_desc(struct virt_dma_desc *vd)
{ … }
static struct uniphier_mdmac_desc *
uniphier_mdmac_next_desc(struct uniphier_mdmac_chan *mc)
{ … }
static void uniphier_mdmac_handle(struct uniphier_mdmac_chan *mc,
struct uniphier_mdmac_desc *md)
{ … }
static void uniphier_mdmac_start(struct uniphier_mdmac_chan *mc)
{ … }
static int uniphier_mdmac_abort(struct uniphier_mdmac_chan *mc)
{ … }
static irqreturn_t uniphier_mdmac_interrupt(int irq, void *dev_id)
{ … }
static void uniphier_mdmac_free_chan_resources(struct dma_chan *chan)
{ … }
static struct dma_async_tx_descriptor *
uniphier_mdmac_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
unsigned int sg_len,
enum dma_transfer_direction direction,
unsigned long flags, void *context)
{ … }
static int uniphier_mdmac_terminate_all(struct dma_chan *chan)
{ … }
static void uniphier_mdmac_synchronize(struct dma_chan *chan)
{ … }
static enum dma_status uniphier_mdmac_tx_status(struct dma_chan *chan,
dma_cookie_t cookie,
struct dma_tx_state *txstate)
{ … }
static void uniphier_mdmac_issue_pending(struct dma_chan *chan)
{ … }
static void uniphier_mdmac_desc_free(struct virt_dma_desc *vd)
{ … }
static int uniphier_mdmac_chan_init(struct platform_device *pdev,
struct uniphier_mdmac_device *mdev,
int chan_id)
{ … }
static int uniphier_mdmac_probe(struct platform_device *pdev)
{ … }
static void uniphier_mdmac_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id uniphier_mdmac_match[] = …;
MODULE_DEVICE_TABLE(of, uniphier_mdmac_match);
static struct platform_driver uniphier_mdmac_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;