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 { |
| 13 | /* Optional pointer to an OF device node */ |
| 14 | struct device_node *of_node; |
| 15 | |
| 16 | /* DMA operations on that device */ |
FUJITA Tomonori | 45223c5 | 2009-08-04 19:08:25 +0000 | [diff] [blame] | 17 | struct dma_map_ops *dma_ops; |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 18 | void *dma_data; |
FUJITA Tomonori | 762afb7 | 2009-08-04 19:08:22 +0000 | [diff] [blame] | 19 | #ifdef CONFIG_SWIOTLB |
| 20 | dma_addr_t max_direct_dma_addr; |
| 21 | #endif |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 22 | }; |
| 23 | |
Anton Vorontsov | 3f3b163 | 2008-11-28 09:13:23 +0000 | [diff] [blame] | 24 | static inline void dev_archdata_set_node(struct dev_archdata *ad, |
| 25 | struct device_node *np) |
| 26 | { |
| 27 | ad->of_node = np; |
| 28 | } |
| 29 | |
| 30 | static inline struct device_node * |
| 31 | dev_archdata_get_node(const struct dev_archdata *ad) |
| 32 | { |
| 33 | return ad->of_node; |
| 34 | } |
| 35 | |
Magnus Damm | d7aacad | 2009-07-08 13:21:31 +0200 | [diff] [blame] | 36 | struct pdev_archdata { |
| 37 | }; |
| 38 | |
Benjamin Herrenschmidt | 12d04ee | 2006-11-11 17:25:02 +1100 | [diff] [blame] | 39 | #endif /* _ASM_POWERPC_DEVICE_H */ |