device.h 745 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Arch specific extensions to struct device
  3. *
  4. * This file is released under the GPLv2
  5. */
  6. #ifndef _ASM_POWERPC_DEVICE_H
  7. #define _ASM_POWERPC_DEVICE_H
  8. struct dma_map_ops;
  9. struct device_node;
  10. struct dev_archdata {
  11. /* Optional pointer to an OF device node */
  12. struct device_node *of_node;
  13. /* DMA operations on that device */
  14. struct dma_map_ops *dma_ops;
  15. void *dma_data;
  16. #ifdef CONFIG_SWIOTLB
  17. dma_addr_t max_direct_dma_addr;
  18. #endif
  19. };
  20. static inline void dev_archdata_set_node(struct dev_archdata *ad,
  21. struct device_node *np)
  22. {
  23. ad->of_node = np;
  24. }
  25. static inline struct device_node *
  26. dev_archdata_get_node(const struct dev_archdata *ad)
  27. {
  28. return ad->of_node;
  29. }
  30. struct pdev_archdata {
  31. };
  32. #endif /* _ASM_POWERPC_DEVICE_H */