]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/dma-mapping.h
Driver core: accept all valid action-strings in uevent-trigger
[linux-2.6-omap-h63xx.git] / include / asm-sh / dma-mapping.h
index 37ab0c131a4d9913036ab1997db036877bec3fda..d3bc7818bbbea2e6631f781739266fb740d0bb7e 100644 (file)
@@ -53,6 +53,10 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
        consistent_free(vaddr, size);
 }
 
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+#define dma_is_consistent(d, h) (1)
+
 static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
                                  enum dma_data_direction dir)
 {
@@ -67,7 +71,7 @@ static inline dma_addr_t dma_map_single(struct device *dev,
        if (dev->bus == &pci_bus_type)
                return virt_to_bus(ptr);
 #endif
-       dma_cache_sync(ptr, size, dir);
+       dma_cache_sync(dev, ptr, size, dir);
 
        return virt_to_bus(ptr);
 }
@@ -81,7 +85,7 @@ static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
 
        for (i = 0; i < nents; i++) {
 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
-               dma_cache_sync(page_address(sg[i].page) + sg[i].offset,
+               dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset,
                               sg[i].length, dir);
 #endif
                sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
@@ -112,7 +116,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
        if (dev->bus == &pci_bus_type)
                return;
 #endif
-       dma_cache_sync(bus_to_virt(dma_handle), size, dir);
+       dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir);
 }
 
 static inline void dma_sync_single_range(struct device *dev,
@@ -124,7 +128,7 @@ static inline void dma_sync_single_range(struct device *dev,
        if (dev->bus == &pci_bus_type)
                return;
 #endif
-       dma_cache_sync(bus_to_virt(dma_handle) + offset, size, dir);
+       dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir);
 }
 
 static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
@@ -134,7 +138,7 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
 
        for (i = 0; i < nelems; i++) {
 #if !defined(CONFIG_PCI) || defined(CONFIG_SH_PCIDMA_NONCOHERENT)
-               dma_cache_sync(page_address(sg[i].page) + sg[i].offset,
+               dma_cache_sync(dev, page_address(sg[i].page) + sg[i].offset,
                               sg[i].length, dir);
 #endif
                sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;