dma-mapping.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #ifndef _ASM_DMA_MAPPING_H
  2. #define _ASM_DMA_MAPPING_H
  3. #include <asm/scatterlist.h>
  4. static inline int
  5. dma_supported(struct device *dev, u64 mask)
  6. {
  7. BUG();
  8. return(0);
  9. }
  10. static inline int
  11. dma_set_mask(struct device *dev, u64 dma_mask)
  12. {
  13. BUG();
  14. return(0);
  15. }
  16. static inline void *
  17. dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
  18. gfp_t flag)
  19. {
  20. BUG();
  21. return((void *) 0);
  22. }
  23. static inline void
  24. dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
  25. dma_addr_t dma_handle)
  26. {
  27. BUG();
  28. }
  29. static inline dma_addr_t
  30. dma_map_single(struct device *dev, void *cpu_addr, size_t size,
  31. enum dma_data_direction direction)
  32. {
  33. BUG();
  34. return(0);
  35. }
  36. static inline void
  37. dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  38. enum dma_data_direction direction)
  39. {
  40. BUG();
  41. }
  42. static inline dma_addr_t
  43. dma_map_page(struct device *dev, struct page *page,
  44. unsigned long offset, size_t size,
  45. enum dma_data_direction direction)
  46. {
  47. BUG();
  48. return(0);
  49. }
  50. static inline void
  51. dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
  52. enum dma_data_direction direction)
  53. {
  54. BUG();
  55. }
  56. static inline int
  57. dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
  58. enum dma_data_direction direction)
  59. {
  60. BUG();
  61. return(0);
  62. }
  63. static inline void
  64. dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
  65. enum dma_data_direction direction)
  66. {
  67. BUG();
  68. }
  69. static inline void
  70. dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
  71. enum dma_data_direction direction)
  72. {
  73. BUG();
  74. }
  75. static inline void
  76. dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
  77. enum dma_data_direction direction)
  78. {
  79. BUG();
  80. }
  81. #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
  82. #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
  83. static inline void
  84. dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  85. enum dma_data_direction direction)
  86. {
  87. BUG();
  88. }
  89. static inline int
  90. dma_mapping_error(struct device *dev, dma_addr_t dma_handle)
  91. {
  92. BUG();
  93. return 0;
  94. }
  95. #endif