smi.h 615 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2015-2016 MediaTek Inc.
  4. * Author: Yong Wu <yong.wu@mediatek.com>
  5. */
  6. #ifndef MTK_IOMMU_SMI_H
  7. #define MTK_IOMMU_SMI_H
  8. #include <linux/bitops.h>
  9. #include <linux/device.h>
  10. #if IS_ENABLED(CONFIG_MTK_SMI)
  11. enum iommu_atf_cmd {
  12. IOMMU_ATF_CMD_CONFIG_SMI_LARB, /* For mm master to en/disable iommu */
  13. IOMMU_ATF_CMD_CONFIG_INFRA_IOMMU, /* For infra master to enable iommu */
  14. IOMMU_ATF_CMD_MAX,
  15. };
  16. #define MTK_SMI_MMU_EN(port) BIT(port)
  17. struct mtk_smi_larb_iommu {
  18. struct device *dev;
  19. unsigned int mmu;
  20. unsigned char bank[32];
  21. };
  22. #endif
  23. #endif