device.h 771 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifdef CONFIG_DMABOUNCE
  10. struct dmabounce_device_info *dmabounce;
  11. #endif
  12. #ifdef CONFIG_IOMMU_API
  13. void *iommu; /* private IOMMU data */
  14. #endif
  15. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  16. struct dma_iommu_mapping *mapping;
  17. #endif
  18. #ifdef CONFIG_XEN
  19. const struct dma_map_ops *dev_dma_ops;
  20. #endif
  21. unsigned int dma_coherent:1;
  22. unsigned int dma_ops_setup:1;
  23. };
  24. struct omap_device;
  25. struct pdev_archdata {
  26. #ifdef CONFIG_ARCH_OMAP
  27. struct omap_device *od;
  28. #endif
  29. };
  30. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  31. #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
  32. #else
  33. #define to_dma_iommu_mapping(dev) NULL
  34. #endif
  35. #endif