device.h 695 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Arch specific extensions to struct device
  3. *
  4. * This file is released under the GPLv2
  5. */
  6. #ifndef ASMARM_DEVICE_H
  7. #define ASMARM_DEVICE_H
  8. struct dev_archdata {
  9. struct dma_map_ops *dma_ops;
  10. #ifdef CONFIG_DMABOUNCE
  11. struct dmabounce_device_info *dmabounce;
  12. #endif
  13. #ifdef CONFIG_IOMMU_API
  14. void *iommu; /* private IOMMU data */
  15. #endif
  16. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  17. struct dma_iommu_mapping *mapping;
  18. #endif
  19. bool dma_coherent;
  20. };
  21. struct omap_device;
  22. struct pdev_archdata {
  23. #ifdef CONFIG_ARCH_OMAP
  24. struct omap_device *od;
  25. #endif
  26. };
  27. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  28. #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
  29. #else
  30. #define to_dma_iommu_mapping(dev) NULL
  31. #endif
  32. #endif