From 5c105d9f3fd086aff195d3849dcf847d6b0bd927 Mon Sep 17 00:00:00 2001 From: blogic Date: Fri, 5 Oct 2012 10:12:53 +0000 Subject: branch Attitude Adjustment git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33625 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...date-the-DMA-map-function-for-CF-platform.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 target/linux/coldfire/patches/050-Update-the-DMA-map-function-for-CF-platform.patch (limited to 'target/linux/coldfire/patches/050-Update-the-DMA-map-function-for-CF-platform.patch') diff --git a/target/linux/coldfire/patches/050-Update-the-DMA-map-function-for-CF-platform.patch b/target/linux/coldfire/patches/050-Update-the-DMA-map-function-for-CF-platform.patch new file mode 100644 index 000000000..a0a7ba7ee --- /dev/null +++ b/target/linux/coldfire/patches/050-Update-the-DMA-map-function-for-CF-platform.patch @@ -0,0 +1,37 @@ +From 2411a3e2b5dfa4784bbe2548f8ef0ce1aea0379e Mon Sep 17 00:00:00 2001 +From: Jason Jin +Date: Thu, 4 Aug 2011 09:59:55 +0800 +Subject: [PATCH 50/52] Update the DMA map function for CF platform + +In the DMA map, only the dcache need to be flushed. +Flush both dcache and icache will decrease the system +performance. + +Signed-off-by: Jason Jin +--- + arch/m68k/kernel/dma.c | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +--- a/arch/m68k/kernel/dma.c ++++ b/arch/m68k/kernel/dma.c +@@ -94,10 +94,18 @@ void dma_sync_single_for_device(struct d + { + switch (dir) { + case DMA_TO_DEVICE: +- cache_push(handle, size); ++#if defined(CONFIG_M5445X) || defined(CONFIG_M5441X) ++ flush_dcache_range(handle, handle + size); ++#else ++ flush_dcache(); ++#endif + break; + case DMA_FROM_DEVICE: +- cache_clear(handle, size); ++#if defined(CONFIG_M5445X) || defined(CONFIG_M5441X) ++ cf_dcache_inv_range(handle, handle + size); ++#else ++ flush_dcache(); ++#endif + break; + case PCI_DMA_BIDIRECTIONAL: + flush_dcache(); -- cgit v1.2.3