Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 1 | /* |
| 2 | * Arch specific extensions to struct device |
| 3 | * |
| 4 | * This file is released under the GPLv2 |
| 5 | */ |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 6 | #ifndef _ASM_POWERPC_DEVICE_H |
| 7 | #define _ASM_POWERPC_DEVICE_H |
Benjamin Herrenschmidt | c6dbaef | 2006-11-11 17:18:39 +1100 | [diff] [blame] | 8 | |
FUJITA Tomonori | 45223c5 | 2009-08-04 19:08:25 +0000 | [diff] [blame] | 9 | struct dma_map_ops; |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 10 | struct device_node; |
| 11 | |
| 12 | struct dev_archdata { |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 13 | /* DMA operations on that device */ |
FUJITA Tomonori | 45223c5 | 2009-08-04 19:08:25 +0000 | [diff] [blame] | 14 | struct dma_map_ops *dma_ops; |
Becky Bruce | 738ef42 | 2009-09-21 08:26:35 +0000 | [diff] [blame] | 15 | |
| 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 Tomonori | 762afb7 | 2009-08-04 19:08:22 +0000 | [diff] [blame] | 25 | #ifdef CONFIG_SWIOTLB |
| 26 | dma_addr_t max_direct_dma_addr; |
| 27 | #endif |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 28 | }; |
| 29 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 30 | struct pdev_archdata { |
Grant Likely | cb6dc51 | 2010-04-13 16:12:59 -0700 | [diff] [blame] | 31 | u64 dma_mask; |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 32 | }; |
| 33 | |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 34 | #endif /* _ASM_POWERPC_DEVICE_H */ |