aboutsummaryrefslogtreecommitdiff
path: root/include/linux/sudmac.h
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-05-15 12:42:15 -0700
committerJohn Stultz <john.stultz@linaro.org>2013-05-15 12:42:15 -0700
commit15a6affec4449b54afba15ab7edbad0cac2736d3 (patch)
treef2fa815f74be0b56acd05e62113600a7113d48a9 /include/linux/sudmac.h
parentcd432fc233f4e7aba43b4fe499a4445f0f6ee1c6 (diff)
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
Merge tag 'v3.10-rc1' into linaro-android-3.10-experimental-mergetracking-linaro-android-3.10-llct-20130518.0
Linux 3.10-rc1
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 @@
+/*
+ * Header for the SUDMAC driver
+ *
+ * Copyright (C) 2013 Renesas Solutions Corp.
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of version 2 of the GNU General Public License as
+ * published by the Free Software Foundation.
+ */
+#ifndef SUDMAC_H
+#define SUDMAC_H
+
+#include <linux/dmaengine.h>
+#include <linux/shdma-base.h>
+#include <linux/types.h>
+
+/* Used by slave DMA clients to request DMA to/from a specific peripheral */
+struct sudmac_slave {
+ struct shdma_slave shdma_slave; /* Set by the platform */
+};
+
+/*
+ * Supplied by platforms to specify, how a DMA channel has to be configured for
+ * a certain peripheral
+ */
+struct sudmac_slave_config {
+ int slave_id;
+};
+
+struct sudmac_channel {
+ unsigned long offset;
+ unsigned long config;
+ unsigned long wait; /* The configuable range is 0 to 3 */
+ unsigned long dint_end_bit;
+};
+
+struct sudmac_pdata {
+ const struct sudmac_slave_config *slave;
+ int slave_num;
+ const struct sudmac_channel *channel;
+ int channel_num;
+};
+
+/* Definitions for the sudmac_channel.config */
+#define SUDMAC_TX_BUFFER_MODE BIT(0)
+#define SUDMAC_RX_END_MODE BIT(1)
+
+/* Definitions for the sudmac_channel.dint_end_bit */
+#define SUDMAC_DMA_BIT_CH0 BIT(0)
+#define SUDMAC_DMA_BIT_CH1 BIT(1)
+
+#endif