summaryrefslogtreecommitdiff
path: root/arch/arm/mm/dma-mapping.c
diff options
context:
space:
mode:
authorb02247 <b02247@freescale.com>2012-05-09 17:30:41 +0800
committerEric Nelson <eric.nelson@boundarydevices.com>2013-07-05 13:01:15 -0700
commitfbe0e429ff069a4c3317ba27d2e2da6efa1736a6 (patch)
tree28ea6457f67c5179ceb3b73134d036852d7f3782 /arch/arm/mm/dma-mapping.c
parent5b1b2dd62690572afc5d806078c0fba6c735637d (diff)
ENGR00181680-1 No audio when play 3 streams after 3~10 seconds sometimes
sdma: bd is bufferable dma buffer, interrupt handler can not get correct data after sdma script updated. Which will cause there is no interrupt after failed period number times in the interrupt handler. This is a workaround. Signed-off-by: b02247 <b02247@freescale.com>
Diffstat (limited to 'arch/arm/mm/dma-mapping.c')
-rw-r--r--arch/arm/mm/dma-mapping.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 0f0baddf4eb9..feb83cb5e993 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -333,6 +333,23 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
* virtual and bus address for that space.
*/
void *
+dma_alloc_noncached(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
+{
+ void *memory;
+
+ if (dma_alloc_from_coherent(dev, size, handle, &memory))
+ return memory;
+
+ return __dma_alloc(dev, size, handle, gfp,
+ pgprot_noncached(pgprot_kernel));
+}
+EXPORT_SYMBOL(dma_alloc_noncached);
+
+/*
+ * Allocate DMA-coherent memory space and return both the kernel remapped
+ * virtual and bus address for that space.
+ */
+void *
dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
{
void *memory;