Marek Szyprowski a227fb92a0 ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops
This patch removes the need for the offset parameter in dma bounce
functions. This is required to let dma-mapping framework on ARM
architecture to use common, generic dma_map_ops based dma-mapping
helpers.

Background and more detailed explaination:

dma_*_range_* functions are available from the early days of the dma
mapping api. They are the correct way of doing a partial syncs on the
buffer (usually used by the network device drivers). This patch changes
only the internal implementation of the dma bounce functions to let
them tunnel through dma_map_ops structure. The driver api stays
unchanged, so driver are obliged to call dma_*_range_* functions to
keep code clean and easy to understand.

The only drawback from this patch is reduced detection of the dma api
abuse. Let us consider the following code:

dma_addr = dma_map_single(dev, ptr, 64, DMA_TO_DEVICE);
dma_sync_single_range_for_cpu(dev, dma_addr+16, 0, 32, DMA_TO_DEVICE);

Without the patch such code fails, because dma bounce code is unable
to find the bounce buffer for the given dma_address. After the patch
the above sync call will be equivalent to:

dma_sync_single_range_for_cpu(dev, dma_addr, 16, 32, DMA_TO_DEVICE);

which succeeds.

I don't consider this as a real problem, because DMA API abuse should be
caught by debug_dma_* function family. This patch lets us to simplify
the internal low-level implementation without chaning the driver visible
API.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:13 +02:00
..
2009-02-01 11:01:22 +05:30
2012-03-29 18:02:10 -07:00
2012-03-28 18:30:01 +01:00
2012-04-03 10:59:10 -07:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2011-03-16 23:35:26 +00:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2009-03-15 21:01:20 -04:00
2009-05-29 08:40:02 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-03-16 23:35:26 +00:00
2011-03-31 11:26:23 -03:00
2012-03-20 21:48:30 +08:00
2012-04-05 11:29:55 -07:00
2010-10-07 14:08:55 +01:00
2010-10-29 13:14:40 -05:00
2012-03-28 18:30:01 +01:00
2012-02-23 20:19:04 -07:00
2012-02-14 12:01:28 -08:00
2012-03-24 09:38:54 +00:00
2010-10-01 22:32:18 -04:00
2008-09-04 09:46:11 +01:00
2008-11-27 12:37:59 +00:00
2012-03-28 18:30:01 +01:00
2012-03-28 18:30:01 +01:00
2012-01-03 22:55:17 -05:00
2012-03-28 18:30:01 +01:00
2011-03-31 11:26:23 -03:00
2012-01-16 08:56:25 -06:00
2011-07-12 11:19:29 -05:00