device.h 878 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #ifdef CONFIG_EEH
  31. struct eeh_dev *edev;
  32. #endif
  33. };
  34. struct pdev_archdata {
  35. u64 dma_mask;
  36. };
  37. #define ARCH_HAS_DMA_GET_REQUIRED_MASK
  38. #endif /* _ASM_POWERPC_DEVICE_H */