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 | |
Nishanth Aravamudan | f6aedd8 | 2010-10-26 17:35:11 +0000 | [diff] [blame] | 12 | /* |
| 13 | * Arch extensions to struct device. |
| 14 | * |
| 15 | * When adding fields, consider macio_add_one_device in |
| 16 | * drivers/macintosh/macio_asic.c |
| 17 | */ |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 18 | struct dev_archdata { |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 19 | /* DMA operations on that device */ |
FUJITA Tomonori | 45223c5 | 2009-08-04 19:08:25 +0000 | [diff] [blame] | 20 | struct dma_map_ops *dma_ops; |
Becky Bruce | 738ef42 | 2009-09-21 08:26:35 +0000 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * When an iommu is in use, dma_data is used as a ptr to the base of the |
| 24 | * iommu_table. Otherwise, it is a simple numerical offset. |
| 25 | */ |
| 26 | union { |
| 27 | dma_addr_t dma_offset; |
| 28 | void *iommu_table_base; |
| 29 | } dma_data; |
| 30 | |
FUJITA Tomonori | 762afb7 | 2009-08-04 19:08:22 +0000 | [diff] [blame] | 31 | #ifdef CONFIG_SWIOTLB |
| 32 | dma_addr_t max_direct_dma_addr; |
| 33 | #endif |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 34 | }; |
| 35 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 36 | struct pdev_archdata { |
Grant Likely | cb6dc51 | 2010-04-13 16:12:59 -0700 | [diff] [blame] | 37 | u64 dma_mask; |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 38 | }; |
| 39 | |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 40 | #endif /* _ASM_POWERPC_DEVICE_H */ |