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