Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * S3C24XX DMA handling
4 *
5 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
6 */
7
8/* Helper to encode the source selection constraints for early s3c socs. */
9#define S3C24XX_DMA_CHANREQ(src, chan) ((BIT(3) | src) << chan * 4)
10
11enum s3c24xx_dma_bus {
12 S3C24XX_DMA_APB,
13 S3C24XX_DMA_AHB,
14};
15
16/**
17 * @bus: on which bus does the peripheral reside - AHB or APB.
18 * @handshake: is a handshake with the peripheral necessary
19 * @chansel: channel selection information, depending on variant; reqsel for
20 * s3c2443 and later and channel-selection map for earlier SoCs
21 * see CHANSEL doc in s3c2443-dma.c
22 */
23struct s3c24xx_dma_channel {
24 enum s3c24xx_dma_bus bus;
25 bool handshake;
26 u16 chansel;
27};
28
29struct dma_slave_map;
30
31/**
32 * struct s3c24xx_dma_platdata - platform specific settings
33 * @num_phy_channels: number of physical channels
34 * @channels: array of virtual channel descriptions
35 * @num_channels: number of virtual channels
36 * @slave_map: dma slave map matching table
37 * @slavecnt: number of elements in slave_map
38 */
39struct s3c24xx_dma_platdata {
40 int num_phy_channels;
41 struct s3c24xx_dma_channel *channels;
42 int num_channels;
43 const struct dma_slave_map *slave_map;
44 int slavecnt;
45};
46
47struct dma_chan;
48bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);