]>
Commit | Line | Data |
---|---|---|
2874c5fd | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
ddeccb8d HS |
2 | /* |
3 | * S3C24XX DMA handling | |
4 | * | |
5 | * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> | |
ddeccb8d HS |
6 | */ |
7 | ||
1fecf895 HS |
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 | ||
ddeccb8d HS |
11 | enum 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 | */ | |
23 | struct s3c24xx_dma_channel { | |
24 | enum s3c24xx_dma_bus bus; | |
25 | bool handshake; | |
26 | u16 chansel; | |
27 | }; | |
28 | ||
34681d84 SVDB |
29 | struct dma_slave_map; |
30 | ||
ddeccb8d HS |
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 | |
34681d84 SVDB |
36 | * @slave_map: dma slave map matching table |
37 | * @slavecnt: number of elements in slave_map | |
ddeccb8d HS |
38 | */ |
39 | struct s3c24xx_dma_platdata { | |
40 | int num_phy_channels; | |
41 | struct s3c24xx_dma_channel *channels; | |
42 | int num_channels; | |
34681d84 SVDB |
43 | const struct dma_slave_map *slave_map; |
44 | int slavecnt; | |
ddeccb8d HS |
45 | }; |
46 | ||
47 | struct dma_chan; | |
48 | bool s3c24xx_dma_filter(struct dma_chan *chan, void *param); |