iommu-omap.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * omap iommu: main structures
  3. *
  4. * Copyright (C) 2008-2009 Nokia Corporation
  5. *
  6. * Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/platform_device.h>
  13. #define MMU_REG_SIZE 256
  14. /**
  15. * struct iommu_arch_data - omap iommu private data
  16. * @name: name of the iommu device
  17. * @iommu_dev: handle of the iommu device
  18. *
  19. * This is an omap iommu private data object, which binds an iommu user
  20. * to its iommu device. This object should be placed at the iommu user's
  21. * dev_archdata so generic IOMMU API can be used without having to
  22. * utilize omap-specific plumbing anymore.
  23. */
  24. struct omap_iommu_arch_data {
  25. const char *name;
  26. struct omap_iommu *iommu_dev;
  27. };
  28. /**
  29. * struct omap_mmu_dev_attr - OMAP mmu device attributes for omap_hwmod
  30. * @da_start: device address where the va space starts.
  31. * @da_end: device address where the va space ends.
  32. * @nr_tlb_entries: number of entries supported by the translation
  33. * look-aside buffer (TLB).
  34. */
  35. struct omap_mmu_dev_attr {
  36. u32 da_start;
  37. u32 da_end;
  38. int nr_tlb_entries;
  39. };
  40. struct iommu_platform_data {
  41. const char *name;
  42. const char *reset_name;
  43. int nr_tlb_entries;
  44. u32 da_start;
  45. u32 da_end;
  46. int (*assert_reset)(struct platform_device *pdev, const char *name);
  47. int (*deassert_reset)(struct platform_device *pdev, const char *name);
  48. };