blob: 5a0cfffe3bbba0ab4e9b578cf58f50b2ccae40ee [file] [log] [blame]
Heiko Stuebnerddeccb82013-10-08 06:42:10 +09001/*
2 * S3C24XX DMA handling
3 *
4 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; either version 2 of the License, or (at your option)
9 * any later version.
10 */
11
12enum s3c24xx_dma_bus {
13 S3C24XX_DMA_APB,
14 S3C24XX_DMA_AHB,
15};
16
17/**
18 * @bus: on which bus does the peripheral reside - AHB or APB.
19 * @handshake: is a handshake with the peripheral necessary
20 * @chansel: channel selection information, depending on variant; reqsel for
21 * s3c2443 and later and channel-selection map for earlier SoCs
22 * see CHANSEL doc in s3c2443-dma.c
23 */
24struct s3c24xx_dma_channel {
25 enum s3c24xx_dma_bus bus;
26 bool handshake;
27 u16 chansel;
28};
29
30/**
31 * struct s3c24xx_dma_platdata - platform specific settings
32 * @num_phy_channels: number of physical channels
33 * @channels: array of virtual channel descriptions
34 * @num_channels: number of virtual channels
35 */
36struct s3c24xx_dma_platdata {
37 int num_phy_channels;
38 struct s3c24xx_dma_channel *channels;
39 int num_channels;
40};
41
42struct dma_chan;
43bool s3c24xx_dma_filter(struct dma_chan *chan, void *param);