shmobile-ipmmu.h 875 B

12345678910111213141516171819202122232425262728293031323334
  1. /* shmobile-ipmmu.h
  2. *
  3. * Copyright (C) 2012 Hideki EIRAKU
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; version 2 of the License.
  8. */
  9. #ifndef __SHMOBILE_IPMMU_H__
  10. #define __SHMOBILE_IPMMU_H__
  11. struct shmobile_ipmmu {
  12. struct device *dev;
  13. void __iomem *ipmmu_base;
  14. int tlb_enabled;
  15. spinlock_t flush_lock;
  16. const char * const *dev_names;
  17. unsigned int num_dev_names;
  18. };
  19. #ifdef CONFIG_SHMOBILE_IPMMU_TLB
  20. void ipmmu_tlb_flush(struct shmobile_ipmmu *ipmmu);
  21. void ipmmu_tlb_set(struct shmobile_ipmmu *ipmmu, unsigned long phys, int size,
  22. int asid);
  23. int ipmmu_iommu_init(struct shmobile_ipmmu *ipmmu);
  24. #else
  25. static inline int ipmmu_iommu_init(struct shmobile_ipmmu *ipmmu)
  26. {
  27. return -EINVAL;
  28. }
  29. #endif
  30. #endif /* __SHMOBILE_IPMMU_H__ */