]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
powerpc: Add sync_*_for_* to dma_ops
authorBecky Bruce <becky.bruce@freescale.com>
Thu, 20 Nov 2008 06:49:16 +0000 (06:49 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Dec 2008 09:46:36 +0000 (20:46 +1100)
commit15e09c0ecaab4a1b4a7ed69db536c38948b92279
tree9cf8f2cbfe002e220db4d001d08fbc50bfaf4433
parentc4d04be11f99cc9ce4e3801a5da235727db704a9
powerpc: Add sync_*_for_* to dma_ops

We need to swap these out once we start using swiotlb, so add
them to dma_ops.  Create CONFIG_PPC_NEED_DMA_SYNC_OPS Kconfig
option; this is currently enabled automatically if we're
CONFIG_NOT_COHERENT_CACHE.  In the future, this will also
be enabled for builds that need swiotlb.  If PPC_NEED_DMA_SYNC_OPS
is not defined, the dma_sync_*_for_* ops compile to nothing.
Otherwise, they access the dma_ops pointers for the sync ops.

This patch also changes dma_sync_single_range_* to actually
sync the range - previously it was using a generous
dma_sync_single.  dma_sync_single_* is now implemented
as a dma_sync_single_range with an offset of 0.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/Kconfig
arch/powerpc/include/asm/dma-mapping.h
arch/powerpc/kernel/dma.c