device.h 533 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Arch specific extensions to struct device
  4. */
  5. #ifndef ASMARM_DEVICE_H
  6. #define ASMARM_DEVICE_H
  7. struct dev_archdata {
  8. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  9. struct dma_iommu_mapping *mapping;
  10. #endif
  11. unsigned int dma_ops_setup:1;
  12. };
  13. struct omap_device;
  14. struct pdev_archdata {
  15. #ifdef CONFIG_ARCH_OMAP
  16. struct omap_device *od;
  17. #endif
  18. };
  19. #ifdef CONFIG_ARM_DMA_USE_IOMMU
  20. #define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
  21. #else
  22. #define to_dma_iommu_mapping(dev) NULL
  23. #endif
  24. #endif