summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/txx9/dmac.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2009-06-16 10:45:23 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2009-06-16 10:45:23 +1000
commit6857bc8a8c89c27acb12d61ca591af5faed24e22 (patch)
tree002c5f27506e03122290670db890ac63cd9dd843 /arch/mips/include/asm/txx9/dmac.h
parentff8ecb77c6cd90166592df4da7a649c80e47f166 (diff)
parent82e55f64130a74d2c2c4d83695151de4a58ff376 (diff)
Merge commit 'mips/mips-for-linux-next'
Conflicts: drivers/char/hw_random/Kconfig drivers/char/hw_random/Makefile
Diffstat (limited to 'arch/mips/include/asm/txx9/dmac.h')
-rw-r--r--arch/mips/include/asm/txx9/dmac.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/mips/include/asm/txx9/dmac.h b/arch/mips/include/asm/txx9/dmac.h
new file mode 100644
index 000000000000..5e9151fccbb4
--- /dev/null
+++ b/arch/mips/include/asm/txx9/dmac.h
@@ -0,0 +1,51 @@
+/*
+ * TXx9 SoC DMA Controller
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_TXX9_DMAC_H
+#define __ASM_TXX9_DMAC_H
+
+#include <linux/dmaengine.h>
+
+#define TXX9_DMA_MAX_NR_CHANNELS 4
+
+/**
+ * struct txx9dmac_platform_data - Controller configuration parameters
+ * @memcpy_chan: Channel used for DMA_MEMCPY
+ * @have_64bit_regs: DMAC have 64 bit registers
+ */
+struct txx9dmac_platform_data {
+ int memcpy_chan;
+ bool have_64bit_regs;
+};
+
+/**
+ * struct txx9dmac_chan_platform_data - Channel configuration parameters
+ * @dmac_dev: A platform device for DMAC
+ */
+struct txx9dmac_chan_platform_data {
+ struct platform_device *dmac_dev;
+};
+
+/**
+ * struct txx9dmac_slave - Controller-specific information about a slave
+ * @tx_reg: physical address of data register used for
+ * memory-to-peripheral transfers
+ * @rx_reg: physical address of data register used for
+ * peripheral-to-memory transfers
+ * @reg_width: peripheral register width
+ */
+struct txx9dmac_slave {
+ u64 tx_reg;
+ u64 rx_reg;
+ unsigned int reg_width;
+};
+
+void txx9_dmac_init(int id, unsigned long baseaddr, int irq,
+ const struct txx9dmac_platform_data *pdata);
+
+#endif /* __ASM_TXX9_DMAC_H */