linux/drivers/dma/sa11x0-dma.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * SA11x0 DMAengine support
 *
 * Copyright (C) 2012 Russell King
 *   Derived in part from arch/arm/mach-sa1100/dma.c,
 *   Copyright (C) 2000, 2001 by Nicolas Pitre
 */
#include <linux/sched.h>
#include <linux/device.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 "virt-dma.h"

#define NR_PHY_CHAN
#define DMA_ALIGN
#define DMA_MAX_SIZE
#define DMA_CHUNK_SIZE

#define DMA_DDAR
#define DMA_DCSR_S
#define DMA_DCSR_C
#define DMA_DCSR_R
#define DMA_DBSA
#define DMA_DBTA
#define DMA_DBSB
#define DMA_DBTB
#define DMA_SIZE

#define DCSR_RUN
#define DCSR_IE
#define DCSR_ERROR
#define DCSR_DONEA
#define DCSR_STRTA
#define DCSR_DONEB
#define DCSR_STRTB
#define DCSR_BIU

#define DDAR_RW
#define DDAR_E
#define DDAR_BS
#define DDAR_DW
#define DDAR_Ser0UDCTr
#define DDAR_Ser0UDCRc
#define DDAR_Ser1SDLCTr
#define DDAR_Ser1SDLCRc
#define DDAR_Ser1UARTTr
#define DDAR_Ser1UARTRc
#define DDAR_Ser2ICPTr
#define DDAR_Ser2ICPRc
#define DDAR_Ser3UARTTr
#define DDAR_Ser3UARTRc
#define DDAR_Ser4MCP0Tr
#define DDAR_Ser4MCP0Rc
#define DDAR_Ser4MCP1Tr
#define DDAR_Ser4MCP1Rc
#define DDAR_Ser4SSPTr
#define DDAR_Ser4SSPRc

struct sa11x0_dma_sg {};

struct sa11x0_dma_desc {};

struct sa11x0_dma_phy;

struct sa11x0_dma_chan {};

struct sa11x0_dma_phy {};

struct sa11x0_dma_dev {};

static struct sa11x0_dma_chan *to_sa11x0_dma_chan(struct dma_chan *chan)
{}

static struct sa11x0_dma_dev *to_sa11x0_dma(struct dma_device *dmadev)
{}

static struct sa11x0_dma_desc *sa11x0_dma_next_desc(struct sa11x0_dma_chan *c)
{}

static void sa11x0_dma_free_desc(struct virt_dma_desc *vd)
{}

static void sa11x0_dma_start_desc(struct sa11x0_dma_phy *p, struct sa11x0_dma_desc *txd)
{}

static void noinline sa11x0_dma_start_sg(struct sa11x0_dma_phy *p,
	struct sa11x0_dma_chan *c)
{}

static void noinline sa11x0_dma_complete(struct sa11x0_dma_phy *p,
	struct sa11x0_dma_chan *c)
{}

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

static void sa11x0_dma_start_txd(struct sa11x0_dma_chan *c)
{}

static void sa11x0_dma_tasklet(struct tasklet_struct *t)
{}


static void sa11x0_dma_free_chan_resources(struct dma_chan *chan)
{}

static dma_addr_t sa11x0_dma_pos(struct sa11x0_dma_phy *p)
{}

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

/*
 * Move pending txds to the issued list, and re-init pending list.
 * If not already pending, add this channel to the list of pending
 * channels and trigger the tasklet to run.
 */
static void sa11x0_dma_issue_pending(struct dma_chan *chan)
{}

static struct dma_async_tx_descriptor *sa11x0_dma_prep_slave_sg(
	struct dma_chan *chan, struct scatterlist *sg, unsigned int sglen,
	enum dma_transfer_direction dir, unsigned long flags, void *context)
{}

static struct dma_async_tx_descriptor *sa11x0_dma_prep_dma_cyclic(
	struct dma_chan *chan, dma_addr_t addr, size_t size, size_t period,
	enum dma_transfer_direction dir, unsigned long flags)
{}

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

static int sa11x0_dma_device_pause(struct dma_chan *chan)
{}

static int sa11x0_dma_device_resume(struct dma_chan *chan)
{}

static int sa11x0_dma_device_terminate_all(struct dma_chan *chan)
{}

struct sa11x0_dma_channel_desc {};

#define CD(d1, d2)
static const struct sa11x0_dma_channel_desc chan_desc[] =;

static const struct dma_slave_map sa11x0_dma_map[] =;

static bool sa11x0_dma_filter_fn(struct dma_chan *chan, void *param)
{}

static int sa11x0_dma_init_dmadev(struct dma_device *dmadev,
	struct device *dev)
{}

static int sa11x0_dma_request_irq(struct platform_device *pdev, int nr,
	void *data)
{}

static void sa11x0_dma_free_irq(struct platform_device *pdev, int nr,
	void *data)
{}

static void sa11x0_dma_free_channels(struct dma_device *dmadev)
{}

static int sa11x0_dma_probe(struct platform_device *pdev)
{}

static void sa11x0_dma_remove(struct platform_device *pdev)
{}

static __maybe_unused int sa11x0_dma_suspend(struct device *dev)
{}

static __maybe_unused int sa11x0_dma_resume(struct device *dev)
{}

static const struct dev_pm_ops sa11x0_dma_pm_ops =;

static struct platform_driver sa11x0_dma_driver =;

static int __init sa11x0_dma_init(void)
{}
subsys_initcall(sa11x0_dma_init);

static void __exit sa11x0_dma_exit(void)
{}
module_exit(sa11x0_dma_exit);

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