linux/drivers/dma/uniphier-xdmac.c

// SPDX-License-Identifier: GPL-2.0
/*
 * External DMA controller driver for UniPhier SoCs
 * Copyright 2019 Socionext Inc.
 * Author: Kunihiko Hayashi <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/bitfield.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_dma.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#include "dmaengine.h"
#include "virt-dma.h"

#define XDMAC_CH_WIDTH

#define XDMAC_TFA
#define XDMAC_TFA_MCNT_MASK
#define XDMAC_TFA_MASK
#define XDMAC_SADM
#define XDMAC_SADM_STW_MASK
#define XDMAC_SADM_SAM
#define XDMAC_SADM_SAM_FIXED
#define XDMAC_SADM_SAM_INC
#define XDMAC_DADM
#define XDMAC_DADM_DTW_MASK
#define XDMAC_DADM_DAM
#define XDMAC_DADM_DAM_FIXED
#define XDMAC_DADM_DAM_INC
#define XDMAC_EXSAD
#define XDMAC_EXDAD
#define XDMAC_SAD
#define XDMAC_DAD
#define XDMAC_ITS
#define XDMAC_ITS_MASK
#define XDMAC_TNUM
#define XDMAC_TNUM_MASK
#define XDMAC_TSS
#define XDMAC_TSS_REQ
#define XDMAC_IEN
#define XDMAC_IEN_ERRIEN
#define XDMAC_IEN_ENDIEN
#define XDMAC_STAT
#define XDMAC_STAT_TENF
#define XDMAC_IR
#define XDMAC_IR_ERRF
#define XDMAC_IR_ENDF
#define XDMAC_ID
#define XDMAC_ID_ERRIDF
#define XDMAC_ID_ENDIDF

#define XDMAC_MAX_CHANS
#define XDMAC_INTERVAL_CLKS
#define XDMAC_MAX_WORDS

/* cut lower bit for maintain alignment of maximum transfer size */
#define XDMAC_MAX_WORD_SIZE

#define UNIPHIER_XDMAC_BUSWIDTHS

struct uniphier_xdmac_desc_node {};

struct uniphier_xdmac_desc {};

struct uniphier_xdmac_chan {};

struct uniphier_xdmac_device {};

static struct uniphier_xdmac_chan *
to_uniphier_xdmac_chan(struct virt_dma_chan *vc)
{}

static struct uniphier_xdmac_desc *
to_uniphier_xdmac_desc(struct virt_dma_desc *vd)
{}

/* xc->vc.lock must be held by caller */
static struct uniphier_xdmac_desc *
uniphier_xdmac_next_desc(struct uniphier_xdmac_chan *xc)
{}

/* xc->vc.lock must be held by caller */
static void uniphier_xdmac_chan_start(struct uniphier_xdmac_chan *xc,
				      struct uniphier_xdmac_desc *xd)
{}

/* xc->vc.lock must be held by caller */
static int uniphier_xdmac_chan_stop(struct uniphier_xdmac_chan *xc)
{}

/* xc->vc.lock must be held by caller */
static void uniphier_xdmac_start(struct uniphier_xdmac_chan *xc)
{}

static void uniphier_xdmac_chan_irq(struct uniphier_xdmac_chan *xc)
{}

static irqreturn_t uniphier_xdmac_irq_handler(int irq, void *dev_id)
{}

static void uniphier_xdmac_free_chan_resources(struct dma_chan *chan)
{}

static struct dma_async_tx_descriptor *
uniphier_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
			       dma_addr_t src, size_t len, unsigned long flags)
{}

static struct dma_async_tx_descriptor *
uniphier_xdmac_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_xdmac_slave_config(struct dma_chan *chan,
				       struct dma_slave_config *config)
{}

static int uniphier_xdmac_terminate_all(struct dma_chan *chan)
{}

static void uniphier_xdmac_synchronize(struct dma_chan *chan)
{}

static void uniphier_xdmac_issue_pending(struct dma_chan *chan)
{}

static void uniphier_xdmac_desc_free(struct virt_dma_desc *vd)
{}

static void uniphier_xdmac_chan_init(struct uniphier_xdmac_device *xdev,
				     int ch)
{}

static struct dma_chan *of_dma_uniphier_xlate(struct of_phandle_args *dma_spec,
					      struct of_dma *ofdma)
{}

static int uniphier_xdmac_probe(struct platform_device *pdev)
{}

static void uniphier_xdmac_remove(struct platform_device *pdev)
{}

static const struct of_device_id uniphier_xdmac_match[] =;
MODULE_DEVICE_TABLE(of, uniphier_xdmac_match);

static struct platform_driver uniphier_xdmac_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();