Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / sudmac.h
blob377b8a5788fa29dd6a3213807cc191c9a2c000fd
1 /*
2 * Header for the SUDMAC driver
4 * Copyright (C) 2013 Renesas Solutions Corp.
6 * This is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
9 */
10 #ifndef SUDMAC_H
11 #define SUDMAC_H
13 #include <linux/dmaengine.h>
14 #include <linux/shdma-base.h>
15 #include <linux/types.h>
17 /* Used by slave DMA clients to request DMA to/from a specific peripheral */
18 struct sudmac_slave {
19 struct shdma_slave shdma_slave; /* Set by the platform */
23 * Supplied by platforms to specify, how a DMA channel has to be configured for
24 * a certain peripheral
26 struct sudmac_slave_config {
27 int slave_id;
30 struct sudmac_channel {
31 unsigned long offset;
32 unsigned long config;
33 unsigned long wait; /* The configuable range is 0 to 3 */
34 unsigned long dint_end_bit;
37 struct sudmac_pdata {
38 const struct sudmac_slave_config *slave;
39 int slave_num;
40 const struct sudmac_channel *channel;
41 int channel_num;
44 /* Definitions for the sudmac_channel.config */
45 #define SUDMAC_TX_BUFFER_MODE BIT(0)
46 #define SUDMAC_RX_END_MODE BIT(1)
48 /* Definitions for the sudmac_channel.dint_end_bit */
49 #define SUDMAC_DMA_BIT_CH0 BIT(0)
50 #define SUDMAC_DMA_BIT_CH1 BIT(1)
52 #endif