device.h 829 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. /*
  11. * Arch extensions to struct device.
  12. *
  13. * When adding fields, consider macio_add_one_device in
  14. * drivers/macintosh/macio_asic.c
  15. */
  16. struct dev_archdata {
  17. /* DMA operations on that device */
  18. struct dma_map_ops *dma_ops;
  19. /*
  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.
  22. */
  23. union {
  24. dma_addr_t dma_offset;
  25. void *iommu_table_base;
  26. } dma_data;
  27. #ifdef CONFIG_SWIOTLB
  28. dma_addr_t max_direct_dma_addr;
  29. #endif
  30. };
  31. struct pdev_archdata {
  32. u64 dma_mask;
  33. };
  34. #define ARCH_HAS_DMA_GET_REQUIRED_MASK
  35. #endif /* _ASM_POWERPC_DEVICE_H */