linux/drivers/dma/ti/omap-dma.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * OMAP DMAengine support
 */
#include <linux/cpu_pm.h>
#include <linux/delay.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/omap-dma.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/of.h>
#include <linux/of_dma.h>

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

#define OMAP_SDMA_REQUESTS
#define OMAP_SDMA_CHANNELS

struct omap_dma_config {};

struct omap_dma_context {};

struct omap_dmadev {};

struct omap_chan {};

#define DESC_NXT_SV_REFRESH
#define DESC_NXT_SV_REUSE
#define DESC_NXT_DV_REFRESH
#define DESC_NXT_DV_REUSE
#define DESC_NTYPE_TYPE2

/* Type 2 descriptor with Source or Destination address update */
struct omap_type2_desc {} __packed;

struct omap_sg {};

struct omap_desc {};

enum {};

static const unsigned es_bytes[] =;

static bool omap_dma_filter_fn(struct dma_chan *chan, void *param);
static struct of_dma_filter_info omap_dma_info =;

static inline struct omap_dmadev *to_omap_dma_dev(struct dma_device *d)
{}

static inline struct omap_chan *to_omap_dma_chan(struct dma_chan *c)
{}

static inline struct omap_desc *to_omap_dma_desc(struct dma_async_tx_descriptor *t)
{}

static void omap_dma_desc_free(struct virt_dma_desc *vd)
{}

static void omap_dma_fill_type2_desc(struct omap_desc *d, int idx,
				     enum dma_transfer_direction dir, bool last)
{}

static void omap_dma_write(uint32_t val, unsigned type, void __iomem *addr)
{}

static unsigned omap_dma_read(unsigned type, void __iomem *addr)
{}

static void omap_dma_glbl_write(struct omap_dmadev *od, unsigned reg, unsigned val)
{}

static unsigned omap_dma_glbl_read(struct omap_dmadev *od, unsigned reg)
{}

static void omap_dma_chan_write(struct omap_chan *c, unsigned reg, unsigned val)
{}

static unsigned omap_dma_chan_read(struct omap_chan *c, unsigned reg)
{}

static void omap_dma_clear_csr(struct omap_chan *c)
{}

static unsigned omap_dma_get_csr(struct omap_chan *c)
{}

static void omap_dma_clear_lch(struct omap_dmadev *od, int lch)
{}

static void omap_dma_assign(struct omap_dmadev *od, struct omap_chan *c,
	unsigned lch)
{}

static void omap_dma_start(struct omap_chan *c, struct omap_desc *d)
{}

static void omap_dma_drain_chan(struct omap_chan *c)
{}

static int omap_dma_stop(struct omap_chan *c)
{}

static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d)
{}

static void omap_dma_start_desc(struct omap_chan *c)
{}

static void omap_dma_callback(int ch, u16 status, void *data)
{}

static irqreturn_t omap_dma_irq(int irq, void *devid)
{}

static int omap_dma_get_lch(struct omap_dmadev *od, int *lch)
{}

static void omap_dma_put_lch(struct omap_dmadev *od, int lch)
{}

static inline bool omap_dma_legacy(struct omap_dmadev *od)
{}

static int omap_dma_alloc_chan_resources(struct dma_chan *chan)
{}

static void omap_dma_free_chan_resources(struct dma_chan *chan)
{}

static size_t omap_dma_sg_size(struct omap_sg *sg)
{}

static size_t omap_dma_desc_size(struct omap_desc *d)
{}

static size_t omap_dma_desc_size_pos(struct omap_desc *d, dma_addr_t addr)
{}

/*
 * OMAP 3.2/3.3 erratum: sometimes 0 is returned if CSAC/CDAC is
 * read before the DMA controller finished disabling the channel.
 */
static uint32_t omap_dma_chan_read_3_3(struct omap_chan *c, unsigned reg)
{}

static dma_addr_t omap_dma_get_src_pos(struct omap_chan *c)
{}

static dma_addr_t omap_dma_get_dst_pos(struct omap_chan *c)
{}

static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
	dma_cookie_t cookie, struct dma_tx_state *txstate)
{}

static void omap_dma_issue_pending(struct dma_chan *chan)
{}

static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
	struct dma_chan *chan, struct scatterlist *sgl, unsigned sglen,
	enum dma_transfer_direction dir, unsigned long tx_flags, void *context)
{}

static struct dma_async_tx_descriptor *omap_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 struct dma_async_tx_descriptor *omap_dma_prep_dma_memcpy(
	struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
	size_t len, unsigned long tx_flags)
{}

static struct dma_async_tx_descriptor *omap_dma_prep_dma_interleaved(
	struct dma_chan *chan, struct dma_interleaved_template *xt,
	unsigned long flags)
{}

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

static int omap_dma_terminate_all(struct dma_chan *chan)
{}

static void omap_dma_synchronize(struct dma_chan *chan)
{}

static int omap_dma_pause(struct dma_chan *chan)
{}

static int omap_dma_resume(struct dma_chan *chan)
{}

static int omap_dma_chan_init(struct omap_dmadev *od)
{}

static void omap_dma_free(struct omap_dmadev *od)
{}

/* Currently used by omap2 & 3 to block deeper SoC idle states */
static bool omap_dma_busy(struct omap_dmadev *od)
{}

/* Currently only used for omap2. For omap1, also a check for lcd_dma is needed */
static int omap_dma_busy_notifier(struct notifier_block *nb,
				  unsigned long cmd, void *v)
{}

/*
 * We are using IRQENABLE_L1, and legacy DMA code was using IRQENABLE_L0.
 * As the DSP may be using IRQENABLE_L2 and L3, let's not touch those for
 * now. Context save seems to be only currently needed on omap3.
 */
static void omap_dma_context_save(struct omap_dmadev *od)
{}

static void omap_dma_context_restore(struct omap_dmadev *od)
{}

/* Currently only used for omap3 */
static int omap_dma_context_notifier(struct notifier_block *nb,
				     unsigned long cmd, void *v)
{}

static void omap_dma_init_gcr(struct omap_dmadev *od, int arb_rate,
			      int max_fifo_depth, int tparams)
{}

#define OMAP_DMA_BUSWIDTHS

/*
 * No flags currently set for default configuration as omap1 is still
 * using platform data.
 */
static const struct omap_dma_config default_cfg;

static int omap_dma_probe(struct platform_device *pdev)
{}

static void omap_dma_remove(struct platform_device *pdev)
{}

static const struct omap_dma_config omap2420_data =;

static const struct omap_dma_config omap2430_data =;

static const struct omap_dma_config omap3430_data =;

static const struct omap_dma_config omap3630_data =;

static const struct omap_dma_config omap4_data =;

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

static struct platform_driver omap_dma_driver =;

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

static int omap_dma_init(void)
{}
subsys_initcall(omap_dma_init);

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

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