xref: /OK3568_Linux_fs/kernel/include/linux/timb_dma.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * timb_dma.h timberdale FPGA DMA driver defines
4*4882a593Smuzhiyun  * Copyright (c) 2010 Intel Corporation
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun 
7*4882a593Smuzhiyun /* Supports:
8*4882a593Smuzhiyun  * Timberdale FPGA DMA engine
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #ifndef _LINUX_TIMB_DMA_H
12*4882a593Smuzhiyun #define _LINUX_TIMB_DMA_H
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun /**
15*4882a593Smuzhiyun  * struct timb_dma_platform_data_channel - Description of each individual
16*4882a593Smuzhiyun  *	DMA channel for the timberdale DMA driver
17*4882a593Smuzhiyun  * @rx:			true if this channel handles data in the direction to
18*4882a593Smuzhiyun  *	the CPU.
19*4882a593Smuzhiyun  * @bytes_per_line:	Number of bytes per line, this is specific for channels
20*4882a593Smuzhiyun  *	handling video data. For other channels this shall be left to 0.
21*4882a593Smuzhiyun  * @descriptors:	Number of descriptors to allocate for this channel.
22*4882a593Smuzhiyun  * @descriptor_elements: Number of elements in each descriptor.
23*4882a593Smuzhiyun  *
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun struct timb_dma_platform_data_channel {
26*4882a593Smuzhiyun 	bool rx;
27*4882a593Smuzhiyun 	unsigned int bytes_per_line;
28*4882a593Smuzhiyun 	unsigned int descriptors;
29*4882a593Smuzhiyun 	unsigned int descriptor_elements;
30*4882a593Smuzhiyun };
31*4882a593Smuzhiyun 
32*4882a593Smuzhiyun /**
33*4882a593Smuzhiyun  * struct timb_dma_platform_data - Platform data of the timberdale DMA driver
34*4882a593Smuzhiyun  * @nr_channels:	Number of defined channels in the channels array.
35*4882a593Smuzhiyun  * @channels:		Definition of the each channel.
36*4882a593Smuzhiyun  *
37*4882a593Smuzhiyun  */
38*4882a593Smuzhiyun struct timb_dma_platform_data {
39*4882a593Smuzhiyun 	unsigned nr_channels;
40*4882a593Smuzhiyun 	struct timb_dma_platform_data_channel channels[32];
41*4882a593Smuzhiyun };
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun #endif
44