diff mbox

[03/13] DSPBRIDGE: Moving functions from mem.c to drv.c

Message ID 4BCF90FB.4080108@ti.com (mailing list archive)
State Under Review, archived
Delegated to:
Headers show

Commit Message

Nishanth Menon April 21, 2010, 11:57 p.m. UTC
None
diff mbox

Patch

From ea35037b8bf9af0ef068248f74ce6c9dcde4df6c Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Wed, 21 Apr 2010 14:49:28 -0500
Subject: [PATCH] DSPBRIDGE: mem: no more cache handling

quick hack to use map and unmap to handle invalid and clean ops

Signed-off-by: Nishanth Menon <nm@ti.com>
---
 drivers/dsp/bridge/services/mem.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dsp/bridge/services/mem.c b/drivers/dsp/bridge/services/mem.c
index 916a49f..49033e7 100644
--- a/drivers/dsp/bridge/services/mem.c
+++ b/drivers/dsp/bridge/services/mem.c
@@ -224,13 +224,13 @@  void mem_flush_cache(void *pMemBuf, u32 byte_size, s32 FlushType)
 	switch (FlushType) {
 		/* invalidate only */
 	case PROC_INVALIDATE_MEM:
-		dmac_inv_range(pMemBuf, pMemBuf + byte_size);
+		dmac_unmap_area(pMemBuf, byte_size, DMA_TO_DEVICE);
 		outer_inv_range(__pa((u32) pMemBuf), __pa((u32) pMemBuf +
 							  byte_size));
 		break;
 		/* writeback only */
 	case PROC_WRITEBACK_MEM:
-		dmac_clean_range(pMemBuf, pMemBuf + byte_size);
+		dmac_map_area(pMemBuf, byte_size, DMA_FROM_DEVICE);
 		outer_clean_range(__pa((u32) pMemBuf), __pa((u32) pMemBuf +
 							    byte_size));
 		break;
-- 
1.6.3.3