1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Header for the SUDMAC driver
5 * Copyright (C) 2013 Renesas Solutions Corp.
10 #include <linux/dmaengine.h>
11 #include <linux/shdma-base.h>
12 #include <linux/types.h>
14 /* Used by slave DMA clients to request DMA to/from a specific peripheral */
16 struct shdma_slave shdma_slave; /* Set by the platform */
20 * Supplied by platforms to specify, how a DMA channel has to be configured for
21 * a certain peripheral
23 struct sudmac_slave_config {
27 struct sudmac_channel {
30 unsigned long wait; /* The configuable range is 0 to 3 */
31 unsigned long dint_end_bit;
35 const struct sudmac_slave_config *slave;
37 const struct sudmac_channel *channel;
41 /* Definitions for the sudmac_channel.config */
42 #define SUDMAC_TX_BUFFER_MODE BIT(0)
43 #define SUDMAC_RX_END_MODE BIT(1)
45 /* Definitions for the sudmac_channel.dint_end_bit */
46 #define SUDMAC_DMA_BIT_CH0 BIT(0)
47 #define SUDMAC_DMA_BIT_CH1 BIT(1)