Full support for Ginger Console
[linux-ginger.git] / arch / powerpc / include / asm / device.h
blob6d94d27ed850a7110627f943398e65b885665075
1 /*
2 * Arch specific extensions to struct device
4 * This file is released under the GPLv2
5 */
6 #ifndef _ASM_POWERPC_DEVICE_H
7 #define _ASM_POWERPC_DEVICE_H
9 struct dma_map_ops;
10 struct device_node;
12 struct dev_archdata {
13 /* Optional pointer to an OF device node */
14 struct device_node *of_node;
16 /* DMA operations on that device */
17 struct dma_map_ops *dma_ops;
20 * When an iommu is in use, dma_data is used as a ptr to the base of the
21 * iommu_table. Otherwise, it is a simple numerical offset.
23 union {
24 dma_addr_t dma_offset;
25 void *iommu_table_base;
26 } dma_data;
28 #ifdef CONFIG_SWIOTLB
29 dma_addr_t max_direct_dma_addr;
30 #endif
33 static inline void dev_archdata_set_node(struct dev_archdata *ad,
34 struct device_node *np)
36 ad->of_node = np;
39 static inline struct device_node *
40 dev_archdata_get_node(const struct dev_archdata *ad)
42 return ad->of_node;
45 struct pdev_archdata {
48 #endif /* _ASM_POWERPC_DEVICE_H */