[PATCH 39/60] microblaze_v4: dma support

monstr at seznam.cz monstr at seznam.cz
Thu Jun 26 22:30:08 EST 2008


From: Michal Simek <monstr at monstr.eu>


Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 include/asm-microblaze/dma-mapping.h |    1 +
 include/asm-microblaze/dma.h         |   18 ++++++++++++++++++
 include/asm-microblaze/scatterlist.h |   26 ++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-microblaze/dma-mapping.h
 create mode 100644 include/asm-microblaze/dma.h
 create mode 100644 include/asm-microblaze/scatterlist.h

diff --git a/include/asm-microblaze/dma-mapping.h b/include/asm-microblaze/dma-mapping.h
new file mode 100644
index 0000000..e7e1690
--- /dev/null
+++ b/include/asm-microblaze/dma-mapping.h
@@ -0,0 +1 @@
+#include <asm-generic/dma-mapping.h>
diff --git a/include/asm-microblaze/dma.h b/include/asm-microblaze/dma.h
new file mode 100644
index 0000000..6ab357b
--- /dev/null
+++ b/include/asm-microblaze/dma.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2006 Atmark Techno, Inc.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _ASM_MICROBLAZE_DMA_H
+#define _ASM_MICROBLAZE_DMA_H
+
+/* we don't have dma address limit. define it as zero to be
+ * unlimited. */
+#define MAX_DMA_ADDRESS		(0)
+
+#define ISA_DMA_THRESHOLD	(0)
+
+#endif /* _ASM_MICROBLAZE_DMA_H */
diff --git a/include/asm-microblaze/scatterlist.h b/include/asm-microblaze/scatterlist.h
new file mode 100644
index 0000000..bbe73e6
--- /dev/null
+++ b/include/asm-microblaze/scatterlist.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2008 Michal Simek <monstr at monstr.eu>
+ * Copyright (C) 2006 Atmark Techno, Inc.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#ifndef _ASM_MICROBLAZE_SCATTERLIST_H
+#define _ASM_MICROBLAZE_SCATTERLIST_H
+
+struct scatterlist {
+#ifdef CONFIG_DEBUG_SG
+	unsigned long	sg_magic;
+#endif
+	unsigned long	page_link;
+	dma_addr_t	dma_address;
+	unsigned int	offset;
+	unsigned int	length;
+};
+
+#define sg_dma_address(sg)      ((sg)->dma_address)
+#define sg_dma_len(sg)          ((sg)->length)
+
+#endif /* _ASM_MICROBLAZE_SCATTERLIST_H */
-- 
1.5.4.GIT




More information about the Linuxppc-dev mailing list