git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
asm-sh
/
dma-mapping.h
diff --git
a/include/asm-sh/dma-mapping.h
b/include/asm-sh/dma-mapping.h
index
db78317
..
8d0867b
100644
(file)
--- a/
include/asm-sh/dma-mapping.h
+++ b/
include/asm-sh/dma-mapping.h
@@
-1,16
+1,15
@@
#ifndef __ASM_SH_DMA_MAPPING_H
#define __ASM_SH_DMA_MAPPING_H
#ifndef __ASM_SH_DMA_MAPPING_H
#define __ASM_SH_DMA_MAPPING_H
-#include <linux/config.h>
#include <linux/mm.h>
#include <linux/mm.h>
-#include <linux/device.h>
#include <asm/scatterlist.h>
#include <asm/scatterlist.h>
+#include <asm/cacheflush.h>
#include <asm/io.h>
extern struct bus_type pci_bus_type;
/* arch/sh/mm/consistent.c */
#include <asm/io.h>
extern struct bus_type pci_bus_type;
/* arch/sh/mm/consistent.c */
-extern void *consistent_alloc(
in
t gfp, size_t size, dma_addr_t *handle);
+extern void *consistent_alloc(
gfp_
t gfp, size_t size, dma_addr_t *handle);
extern void consistent_free(void *vaddr, size_t size);
extern void consistent_sync(void *vaddr, size_t size, int direction);
extern void consistent_free(void *vaddr, size_t size);
extern void consistent_sync(void *vaddr, size_t size, int direction);
@@
-27,7
+26,7
@@
static inline int dma_set_mask(struct device *dev, u64 mask)
}
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
}
static inline void *dma_alloc_coherent(struct device *dev, size_t size,
- dma_addr_t *dma_handle,
in
t flag)
+ dma_addr_t *dma_handle,
gfp_
t flag)
{
if (sh_mv.mv_consistent_alloc) {
void *ret;
{
if (sh_mv.mv_consistent_alloc) {
void *ret;
@@
-54,7
+53,7
@@
static inline void dma_free_coherent(struct device *dev, size_t size,
consistent_free(vaddr, size);
}
consistent_free(vaddr, size);
}
-static inline void dma_cache_sync(void *vaddr, size_t size,
+static inline void dma_cache_sync(
struct device *dev,
void *vaddr, size_t size,
enum dma_data_direction dir)
{
consistent_sync(vaddr, size, (int)dir);
enum dma_data_direction dir)
{
consistent_sync(vaddr, size, (int)dir);
@@
-68,7
+67,7
@@
static inline dma_addr_t dma_map_single(struct device *dev,
if (dev->bus == &pci_bus_type)
return virt_to_bus(ptr);
#endif
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);
}
return virt_to_bus(ptr);
}
@@
-82,7
+81,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)
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;
sg[i].length, dir);
#endif
sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
@@
-113,7
+112,7
@@
static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
if (dev->bus == &pci_bus_type)
return;
#endif
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,
}
static inline void dma_sync_single_range(struct device *dev,
@@
-125,7
+124,7
@@
static inline void dma_sync_single_range(struct device *dev,
if (dev->bus == &pci_bus_type)
return;
#endif
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,
}
static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
@@
-135,7
+134,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)
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;
sg[i].length, dir);
#endif
sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset;
@@
-145,22
+144,32
@@
static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
static inline void dma_sync_single_for_cpu(struct device *dev,
dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir)
static inline void dma_sync_single_for_cpu(struct device *dev,
dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir)
- __attribute__ ((alias("dma_sync_single")));
+{
+ dma_sync_single(dev, dma_handle, size, dir);
+}
static inline void dma_sync_single_for_device(struct device *dev,
static inline void dma_sync_single_for_device(struct device *dev,
- dma_addr_t dma_handle, size_t size,
- enum dma_data_direction dir)
- __attribute__ ((alias("dma_sync_single")));
+ dma_addr_t dma_handle,
+ size_t size,
+ enum dma_data_direction dir)
+{
+ dma_sync_single(dev, dma_handle, size, dir);
+}
static inline void dma_sync_sg_for_cpu(struct device *dev,
struct scatterlist *sg, int nelems,
enum dma_data_direction dir)
static inline void dma_sync_sg_for_cpu(struct device *dev,
struct scatterlist *sg, int nelems,
enum dma_data_direction dir)
- __attribute__ ((alias("dma_sync_sg")));
+{
+ dma_sync_sg(dev, sg, nelems, dir);
+}
static inline void dma_sync_sg_for_device(struct device *dev,
static inline void dma_sync_sg_for_device(struct device *dev,
- struct scatterlist *sg, int nelems,
- enum dma_data_direction dir)
- __attribute__ ((alias("dma_sync_sg")));
+ struct scatterlist *sg, int nelems,
+ enum dma_data_direction dir)
+{
+ dma_sync_sg(dev, sg, nelems, dir);
+}
+
static inline int dma_get_cache_alignment(void)
{
static inline int dma_get_cache_alignment(void)
{
@@
-175,6
+184,4
@@
static inline int dma_mapping_error(dma_addr_t dma_addr)
{
return dma_addr == 0;
}
{
return dma_addr == 0;
}
-
#endif /* __ASM_SH_DMA_MAPPING_H */
#endif /* __ASM_SH_DMA_MAPPING_H */
-