summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-03-09 08:32:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-09 08:32:21 +0100
commit4680b375b9dd32e6558ae2ee8a15b27819c70e73 (patch)
tree945cd90ff3557de600e6e208596c7ef846fb603e /include
parent5544581e98d09c7c9008f9cac8cd25dbb6a14d6e (diff)
parent0e06a77f5b93d4479ff1b88bc32003ceaa37d152 (diff)
downloadbarebox-4680b375b9dd32e6558ae2ee8a15b27819c70e73.tar.gz
barebox-4680b375b9dd32e6558ae2ee8a15b27819c70e73.tar.xz
Merge branch 'for-next/streaming-dma'
Conflicts: drivers/mci/dw_mmc.c
Diffstat (limited to 'include')
-rw-r--r--include/dma-dir.h6
-rw-r--r--include/dma.h13
-rw-r--r--include/usb/gadget.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/include/dma-dir.h b/include/dma-dir.h
new file mode 100644
index 0000000000..ba107f10ce
--- /dev/null
+++ b/include/dma-dir.h
@@ -0,0 +1,6 @@
+enum dma_data_direction {
+ DMA_BIDIRECTIONAL = 0,
+ DMA_TO_DEVICE = 1,
+ DMA_FROM_DEVICE = 2,
+ DMA_NONE = 3,
+};
diff --git a/include/dma.h b/include/dma.h
index 899f831faa..800d8b155f 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -11,8 +11,11 @@
#include <malloc.h>
#include <xfuncs.h>
+#include <dma-dir.h>
#include <asm/dma.h>
+#define DMA_ADDRESS_BROKEN NULL
+
#ifndef dma_alloc
static inline void *dma_alloc(size_t size)
{
@@ -27,4 +30,14 @@ static inline void dma_free(void *mem)
}
#endif
+/* streaming DMA - implement the below calls to support HAS_DMA */
+void dma_sync_single_for_cpu(unsigned long address, size_t size,
+ enum dma_data_direction dir);
+
+void dma_sync_single_for_device(unsigned long address, size_t size,
+ enum dma_data_direction dir);
+
+void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle);
+void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size);
+
#endif /* __DMA_H */
diff --git a/include/usb/gadget.h b/include/usb/gadget.h
index f663e98abf..80418a9cd4 100644
--- a/include/usb/gadget.h
+++ b/include/usb/gadget.h
@@ -15,6 +15,7 @@
#ifndef __LINUX_USB_GADGET_H
#define __LINUX_USB_GADGET_H
+#include <common.h>
#include <malloc.h>
#include <driver.h>
#include <linux/list.h>