• Becky Bruce's avatar
    powerpc: Add sync_*_for_* to dma_ops · 15e09c0e
    Becky Bruce authored
    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: default avatarBecky Bruce <becky.bruce@freescale.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    15e09c0e
dma.c 4.1 KB