From: Albert H. <he...@us...> - 2009-10-25 18:57:05
|
Update of /cvsroot/gc-linux/linux/arch/powerpc/include/asm In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv32669/arch/powerpc/include/asm Modified Files: dma-mapping.h Log Message: Forward to v2.6.31. Index: dma-mapping.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/include/asm/dma-mapping.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** dma-mapping.h 25 Oct 2009 18:53:45 -0000 1.3 --- dma-mapping.h 25 Oct 2009 18:56:55 -0000 1.4 *************** *** 16,22 **** --- 16,31 ---- #include <linux/dma-attrs.h> #include <asm/io.h> + #include <asm/swiotlb.h> #define DMA_ERROR_CODE (~(dma_addr_t)0x0) + /* Some dma direct funcs must be visible for use in other dma_ops */ + extern void *dma_direct_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, gfp_t flag); + extern void dma_direct_free_coherent(struct device *dev, size_t size, + void *vaddr, dma_addr_t dma_handle); + + extern unsigned long get_dma_direct_offset(struct device *dev); + #ifdef CONFIG_NOT_COHERENT_CACHE /* *************** *** 79,82 **** --- 88,93 ---- enum dma_data_direction direction, struct dma_attrs *attrs); + int (*addr_needs_map)(struct device *dev, dma_addr_t addr, + size_t size); #ifdef CONFIG_PPC_NEED_DMA_SYNC_OPS void (*sync_single_range_for_cpu)(struct device *hwdev, *************** *** 299,303 **** BUG_ON(!dma_ops); ! dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0, size, direction); } --- 310,316 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_single_range_for_cpu) ! dma_ops->sync_single_range_for_cpu(dev, dma_handle, 0, size, direction); } *************** *** 310,314 **** BUG_ON(!dma_ops); ! dma_ops->sync_single_range_for_device(dev, dma_handle, 0, size, direction); } --- 323,329 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_single_range_for_device) ! dma_ops->sync_single_range_for_device(dev, dma_handle, 0, size, direction); } *************** *** 321,325 **** BUG_ON(!dma_ops); ! dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction); } --- 336,342 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_sg_for_cpu) ! dma_ops->sync_sg_for_cpu(dev, sgl, nents, direction); } *************** *** 331,335 **** BUG_ON(!dma_ops); ! dma_ops->sync_sg_for_device(dev, sgl, nents, direction); } --- 348,354 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_sg_for_device) ! dma_ops->sync_sg_for_device(dev, sgl, nents, direction); } *************** *** 341,345 **** BUG_ON(!dma_ops); ! dma_ops->sync_single_range_for_cpu(dev, dma_handle, offset, size, direction); } --- 360,366 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_single_range_for_cpu) ! dma_ops->sync_single_range_for_cpu(dev, dma_handle, offset, size, direction); } *************** *** 352,356 **** BUG_ON(!dma_ops); ! dma_ops->sync_single_range_for_device(dev, dma_handle, offset, size, direction); } --- 373,379 ---- BUG_ON(!dma_ops); ! ! if (dma_ops->sync_single_range_for_device) ! dma_ops->sync_single_range_for_device(dev, dma_handle, offset, size, direction); } |