device.h 663 B

123456789101112131415161718192021222324252627282930313233
  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_mapping_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_mapping_ops *dma_ops;
  15. void *dma_data;
  16. };
  17. static inline void dev_archdata_set_node(struct dev_archdata *ad,
  18. struct device_node *np)
  19. {
  20. ad->of_node = np;
  21. }
  22. static inline struct device_node *
  23. dev_archdata_get_node(const struct dev_archdata *ad)
  24. {
  25. return ad->of_node;
  26. }
  27. #endif /* _ASM_POWERPC_DEVICE_H */