aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sudmac.h
diff options
context:
space:
mode:
authorShimoda, Yoshihiro <yoshihiro.shimoda.uh@renesas.com>2013-04-23 07:00:12 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-30 06:20:12 -0400
commit18a1053f7b85acdda2428c9f694101070cb8e62a (patch)
tree483b29e4ac010e751e958ea9e310b6b49c47d384 /include/linux/sudmac.h
parent189b4ee8e9daf349db80f47b81edec67d223a953 (diff)
sudmac: add support for SUDMAC
Some Renesas USB modules have SUDMAC. This patch supports it using the shdma-base driver. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/sudmac.h')
-rw-r--r--include/linux/sudmac.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/linux/sudmac.h b/include/linux/sudmac.h
new file mode 100644
index 000000000000..377b8a5788fa
--- /dev/null
+++ b/include/linux/sudmac.h
@@ -0,0 +1,52 @@
1/*
2 * Header for the SUDMAC driver
3 *
4 * Copyright (C) 2013 Renesas Solutions Corp.
5 *
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
12
13#include <linux/dmaengine.h>
14#include <linux/shdma-base.h>
15#include <linux/types.h>
16
17/* Used by slave DMA clients to request DMA to/from a specific peripheral */
18struct sudmac_slave {
19 struct shdma_slave shdma_slave; /* Set by the platform */
20};
21
22/*
23 * Supplied by platforms to specify, how a DMA channel has to be configured for
24 * a certain peripheral
25 */
26struct sudmac_slave_config {
27 int slave_id;
28};
29
30struct 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;
35};
36
37struct sudmac_pdata {
38 const struct sudmac_slave_config *slave;
39 int slave_num;
40 const struct sudmac_channel *channel;
41 int channel_num;
42};
43
44/* Definitions for the sudmac_channel.config */
45#define SUDMAC_TX_BUFFER_MODE BIT(0)
46#define SUDMAC_RX_END_MODE BIT(1)
47
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)
51
52#endif