dma-mapping.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. #define dma_is_consistent(d, h) (1)
  84. static inline int
  85. dma_get_cache_alignment(void)
  86. {
  87. BUG();
  88. return(0);
  89. }
  90. static inline void
  91. dma_sync_single_range(struct device *dev, dma_addr_t dma_handle,
  92. unsigned long offset, size_t size,
  93. enum dma_data_direction direction)
  94. {
  95. BUG();
  96. }
  97. static inline void
  98. dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  99. enum dma_data_direction direction)
  100. {
  101. BUG();
  102. }
  103. static inline int
  104. dma_mapping_error(struct device *dev, dma_addr_t dma_handle)
  105. {
  106. BUG();
  107. return 0;
  108. }
  109. #endif