blob: 7f7916238208cf13999c8ccfee9086e823cea8ca [file] [log] [blame]
FUJITA Tomonori4d9b9772009-01-05 23:36:12 +09001#include <linux/dma-mapping.h>
Paul Gortmakerbd3ff192011-07-31 18:33:21 -04002#include <linux/export.h>
FUJITA Tomonori4d9b9772009-01-05 23:36:12 +09003
FUJITA Tomonorifb446722009-01-27 23:43:59 +09004/* Set this to 1 if there is a HW IOMMU in the system */
5int iommu_detected __read_mostly;
6
FUJITA Tomonori160c1d82009-01-05 23:59:02 +09007struct dma_map_ops *dma_ops;
FUJITA Tomonori4d9b9772009-01-05 23:36:12 +09008EXPORT_SYMBOL(dma_ops);
FUJITA Tomonoric190ab02009-01-05 23:36:16 +09009
fujita390bd132009-07-09 21:25:05 -070010#define PREALLOC_DMA_DEBUG_ENTRIES (1 << 16)
11
12static int __init dma_init(void)
13{
Luck, Tonyf2486f22009-08-31 16:54:03 -070014 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
15
16 return 0;
fujita390bd132009-07-09 21:25:05 -070017}
18fs_initcall(dma_init);
19
FUJITA Tomonori160c1d82009-01-05 23:59:02 +090020struct dma_map_ops *dma_get_ops(struct device *dev)
FUJITA Tomonoric190ab02009-01-05 23:36:16 +090021{
22 return dma_ops;
23}
24EXPORT_SYMBOL(dma_get_ops);