blob: a3954e4fcbe2edbc5466e8d2ff4bffb16ca57312 [file] [log] [blame]
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11001/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +11006#ifndef _ASM_POWERPC_DEVICE_H
7#define _ASM_POWERPC_DEVICE_H
Benjamin Herrenschmidtc6dbaef2006-11-11 17:18:39 +11008
FUJITA Tomonori45223c52009-08-04 19:08:25 +00009struct dma_map_ops;
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +110010struct device_node;
11
12struct dev_archdata {
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +110013 /* DMA operations on that device */
FUJITA Tomonori45223c52009-08-04 19:08:25 +000014 struct dma_map_ops *dma_ops;
Becky Bruce738ef422009-09-21 08:26:35 +000015
16 /*
17 * When an iommu is in use, dma_data is used as a ptr to the base of the
18 * iommu_table. Otherwise, it is a simple numerical offset.
19 */
20 union {
21 dma_addr_t dma_offset;
22 void *iommu_table_base;
23 } dma_data;
24
FUJITA Tomonori762afb72009-08-04 19:08:22 +000025#ifdef CONFIG_SWIOTLB
26 dma_addr_t max_direct_dma_addr;
27#endif
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +110028};
29
Magnus Dammd7aacad2009-07-08 13:21:31 +020030struct pdev_archdata {
Grant Likelycb6dc512010-04-13 16:12:59 -070031 u64 dma_mask;
Magnus Dammd7aacad2009-07-08 13:21:31 +020032};
33
Benjamin Herrenschmidt12d04ee2006-11-11 17:25:02 +110034#endif /* _ASM_POWERPC_DEVICE_H */