linux/drivers/dma/k3dma.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2013 - 2015 Linaro Ltd.
 * Copyright (c) 2013 HiSilicon Limited.
 */
#include <linux/sched.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/dmaengine.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/of.h>
#include <linux/clk.h>
#include <linux/of_dma.h>

#include "virt-dma.h"

#define DRIVER_NAME
#define DMA_MAX_SIZE
#define DMA_CYCLIC_MAX_PERIOD
#define LLI_BLOCK_SIZE

#define INT_STAT
#define INT_TC1
#define INT_TC2
#define INT_ERR1
#define INT_ERR2
#define INT_TC1_MASK
#define INT_TC2_MASK
#define INT_ERR1_MASK
#define INT_ERR2_MASK
#define INT_TC1_RAW
#define INT_TC2_RAW
#define INT_ERR1_RAW
#define INT_ERR2_RAW
#define CH_PRI
#define CH_STAT
#define CX_CUR_CNT
#define CX_LLI
#define CX_CNT1
#define CX_CNT0
#define CX_SRC
#define CX_DST
#define CX_CFG

#define CX_LLI_CHAIN_EN
#define CX_CFG_EN
#define CX_CFG_NODEIRQ
#define CX_CFG_MEM2PER
#define CX_CFG_PER2MEM
#define CX_CFG_SRCINCR
#define CX_CFG_DSTINCR

struct k3_desc_hw {} __aligned();

struct k3_dma_desc_sw {};

struct k3_dma_phy;

struct k3_dma_chan {};

struct k3_dma_phy {};

struct k3_dma_dev {};


#define K3_FLAG_NOCLK

struct k3dma_soc_data {};


#define to_k3_dma(dmadev)

static int k3_dma_config_write(struct dma_chan *chan,
			       enum dma_transfer_direction dir,
			       struct dma_slave_config *cfg);

static struct k3_dma_chan *to_k3_chan(struct dma_chan *chan)
{}

static void k3_dma_pause_dma(struct k3_dma_phy *phy, bool on)
{}

static void k3_dma_terminate_chan(struct k3_dma_phy *phy, struct k3_dma_dev *d)
{}

static void k3_dma_set_desc(struct k3_dma_phy *phy, struct k3_desc_hw *hw)
{}

static u32 k3_dma_get_curr_cnt(struct k3_dma_dev *d, struct k3_dma_phy *phy)
{}

static u32 k3_dma_get_curr_lli(struct k3_dma_phy *phy)
{}

static u32 k3_dma_get_chan_stat(struct k3_dma_dev *d)
{}

static void k3_dma_enable_dma(struct k3_dma_dev *d, bool on)
{}

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

static int k3_dma_start_txd(struct k3_dma_chan *c)
{}

static void k3_dma_tasklet(struct tasklet_struct *t)
{}

static void k3_dma_free_chan_resources(struct dma_chan *chan)
{}

static enum dma_status k3_dma_tx_status(struct dma_chan *chan,
	dma_cookie_t cookie, struct dma_tx_state *state)
{}

static void k3_dma_issue_pending(struct dma_chan *chan)
{}

static void k3_dma_fill_desc(struct k3_dma_desc_sw *ds, dma_addr_t dst,
			dma_addr_t src, size_t len, u32 num, u32 ccfg)
{}

static struct k3_dma_desc_sw *k3_dma_alloc_desc_resource(int num,
							struct dma_chan *chan)
{}

static struct dma_async_tx_descriptor *k3_dma_prep_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 *k3_dma_prep_slave_sg(
	struct dma_chan *chan, struct scatterlist *sgl, unsigned int sglen,
	enum dma_transfer_direction dir, unsigned long flags, void *context)
{}

static struct dma_async_tx_descriptor *
k3_dma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
		       size_t buf_len, size_t period_len,
		       enum dma_transfer_direction dir,
		       unsigned long flags)
{}

static int k3_dma_config(struct dma_chan *chan,
			 struct dma_slave_config *cfg)
{}

static int k3_dma_config_write(struct dma_chan *chan,
			       enum dma_transfer_direction dir,
			       struct dma_slave_config *cfg)
{}

static void k3_dma_free_desc(struct virt_dma_desc *vd)
{}

static int k3_dma_terminate_all(struct dma_chan *chan)
{}

static void k3_dma_synchronize(struct dma_chan *chan)
{}

static int k3_dma_transfer_pause(struct dma_chan *chan)
{}

static int k3_dma_transfer_resume(struct dma_chan *chan)
{}

static const struct k3dma_soc_data k3_v1_dma_data =;

static const struct k3dma_soc_data asp_v1_dma_data =;

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

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

static int k3_dma_probe(struct platform_device *op)
{}

static void k3_dma_remove(struct platform_device *op)
{}

#ifdef CONFIG_PM_SLEEP
static int k3_dma_suspend_dev(struct device *dev)
{}

static int k3_dma_resume_dev(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(k3_dma_pmops, k3_dma_suspend_dev, k3_dma_resume_dev);

static struct platform_driver k3_pdma_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_ALIAS();
MODULE_LICENSE();