FUJITA Tomonori | 4d9b977 | 2009-01-05 23:36:12 +0900 | [diff] [blame] | 1 | #include <linux/dma-mapping.h> |
Paul Gortmaker | bd3ff19 | 2011-07-31 18:33:21 -0400 | [diff] [blame] | 2 | #include <linux/export.h> |
FUJITA Tomonori | 4d9b977 | 2009-01-05 23:36:12 +0900 | [diff] [blame] | 3 | |
FUJITA Tomonori | fb44672 | 2009-01-27 23:43:59 +0900 | [diff] [blame] | 4 | /* Set this to 1 if there is a HW IOMMU in the system */ |
| 5 | int iommu_detected __read_mostly; |
| 6 | |
FUJITA Tomonori | 160c1d8 | 2009-01-05 23:59:02 +0900 | [diff] [blame] | 7 | struct dma_map_ops *dma_ops; |
FUJITA Tomonori | 4d9b977 | 2009-01-05 23:36:12 +0900 | [diff] [blame] | 8 | EXPORT_SYMBOL(dma_ops); |
FUJITA Tomonori | c190ab0 | 2009-01-05 23:36:16 +0900 | [diff] [blame] | 9 | |
fujita | 390bd13 | 2009-07-09 21:25:05 -0700 | [diff] [blame] | 10 | #define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16) |
| 11 | |
| 12 | static int __init dma_init(void) |
| 13 | { |
Luck, Tony | f2486f2 | 2009-08-31 16:54:03 -0700 | [diff] [blame] | 14 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); |
| 15 | |
| 16 | return 0; |
fujita | 390bd13 | 2009-07-09 21:25:05 -0700 | [diff] [blame] | 17 | } |
| 18 | fs_initcall(dma_init); |
| 19 | |
FUJITA Tomonori | 160c1d8 | 2009-01-05 23:59:02 +0900 | [diff] [blame] | 20 | struct dma_map_ops *dma_get_ops(struct device *dev) |
FUJITA Tomonori | c190ab0 | 2009-01-05 23:36:16 +0900 | [diff] [blame] | 21 | { |
| 22 | return dma_ops; |
| 23 | } |
| 24 | EXPORT_SYMBOL(dma_get_ops); |