diff options
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/dmabounce.c | 56 | ||||
-rw-r--r-- | arch/arm/common/locomo.c | 2 | ||||
-rw-r--r-- | arch/arm/common/sa1111.c | 2 | ||||
-rw-r--r-- | arch/arm/common/sharpsl_pm.c | 11 | ||||
-rw-r--r-- | arch/arm/common/time-acorn.c | 2 | ||||
-rw-r--r-- | arch/arm/common/uengine.c | 3 |
6 files changed, 38 insertions, 38 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 69130f36590..aecc6c3f908 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -246,9 +246,9 @@ map_single(struct device *dev, void *ptr, size_t size, } dev_dbg(dev, - "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n", - __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), - buf->safe, (void *) buf->safe_dma_addr); + "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), + buf->safe, buf->safe_dma_addr); if ((dir == DMA_TO_DEVICE) || (dir == DMA_BIDIRECTIONAL)) { @@ -292,9 +292,9 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, BUG_ON(buf->size != size); dev_dbg(dev, - "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n", - __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), - buf->safe, (void *) buf->safe_dma_addr); + "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), + buf->safe, buf->safe_dma_addr); DO_STATS ( device_info->bounce_count++ ); @@ -321,9 +321,8 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, } } -static inline void -sync_single(struct device *dev, dma_addr_t dma_addr, size_t size, - enum dma_data_direction dir) +static int sync_single(struct device *dev, dma_addr_t dma_addr, size_t size, + enum dma_data_direction dir) { struct dmabounce_device_info *device_info = dev->archdata.dmabounce; struct safe_buffer *buf = NULL; @@ -355,9 +354,9 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size, */ dev_dbg(dev, - "%s: unsafe buffer %p (phy=%p) mapped to %p (phy=%p)\n", - __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), - buf->safe, (void *) buf->safe_dma_addr); + "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n", + __func__, buf->ptr, virt_to_dma(dev, buf->ptr), + buf->safe, buf->safe_dma_addr); DO_STATS ( device_info->bounce_count++ ); @@ -383,8 +382,9 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size, * No need to sync the safe buffer - it was allocated * via the coherent allocators. */ + return 0; } else { - dma_cache_maint(dma_to_virt(dev, dma_addr), size, dir); + return 1; } } @@ -474,25 +474,29 @@ dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, } } -void -dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, size_t size, - enum dma_data_direction dir) +void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_addr, + unsigned long offset, size_t size, + enum dma_data_direction dir) { - dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", - __func__, (void *) dma_addr, size, dir); + dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n", + __func__, dma_addr, offset, size, dir); - sync_single(dev, dma_addr, size, dir); + if (sync_single(dev, dma_addr, offset + size, dir)) + dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir); } +EXPORT_SYMBOL(dma_sync_single_range_for_cpu); -void -dma_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, size_t size, - enum dma_data_direction dir) +void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_addr, + unsigned long offset, size_t size, + enum dma_data_direction dir) { - dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n", - __func__, (void *) dma_addr, size, dir); + dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n", + __func__, dma_addr, offset, size, dir); - sync_single(dev, dma_addr, size, dir); + if (sync_single(dev, dma_addr, offset + size, dir)) + dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir); } +EXPORT_SYMBOL(dma_sync_single_range_for_device); void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, @@ -644,8 +648,6 @@ EXPORT_SYMBOL(dma_map_single); EXPORT_SYMBOL(dma_unmap_single); EXPORT_SYMBOL(dma_map_sg); EXPORT_SYMBOL(dma_unmap_sg); -EXPORT_SYMBOL(dma_sync_single_for_cpu); -EXPORT_SYMBOL(dma_sync_single_for_device); EXPORT_SYMBOL(dma_sync_sg_for_cpu); EXPORT_SYMBOL(dma_sync_sg_for_device); EXPORT_SYMBOL(dmabounce_register_dev); diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 85579654d3b..283051eaf93 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -25,7 +25,7 @@ #include <linux/slab.h> #include <linux/spinlock.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/mach/irq.h> diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index f6d3fdda706..ec8a5471bf0 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -26,7 +26,7 @@ #include <linux/dma-mapping.h> #include <linux/clk.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/io.h> #include <asm/irq.h> diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 8822b684d47..db830916140 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -26,13 +26,12 @@ #include <linux/apm-emulation.h> #include <linux/suspend.h> -#include <asm/hardware.h> -#include <asm/mach-types.h> +#include <mach/hardware.h> #include <asm/irq.h> -#include <asm/arch/pm.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/pxa2xx-regs.h> -#include <asm/arch/sharpsl.h> +#include <mach/pm.h> +#include <mach/pxa-regs.h> +#include <mach/pxa2xx-regs.h> +#include <mach/sharpsl.h> #include <asm/hardware/sharpsl_pm.h> /* diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c index d544da41473..df0983aafe6 100644 --- a/arch/arm/common/time-acorn.c +++ b/arch/arm/common/time-acorn.c @@ -18,7 +18,7 @@ #include <linux/interrupt.h> #include <linux/irq.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/hardware/ioc.h> diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c index 117cab30bd3..7ecd3c0ab01 100644 --- a/arch/arm/common/uengine.c +++ b/arch/arm/common/uengine.c @@ -16,8 +16,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <linux/string.h> -#include <asm/hardware.h> -#include <asm/arch/hardware.h> +#include <mach/hardware.h> #include <asm/hardware/uengine.h> #include <asm/io.h> |