|
@@ -31,7 +31,6 @@
|
|
|
#include <linux/slab.h>
|
|
|
#include <linux/spinlock.h>
|
|
|
#include <asm/barrier.h>
|
|
|
-#include <dt-bindings/memory/mt8173-larb-port.h>
|
|
|
#include <soc/mediatek/smi.h>
|
|
|
|
|
|
#include "mtk_iommu.h"
|
|
@@ -93,6 +92,13 @@
|
|
|
|
|
|
#define MTK_PROTECT_PA_ALIGN 128
|
|
|
|
|
|
+/*
|
|
|
+ * Get the local arbiter ID and the portid within the larb arbiter
|
|
|
+ * from mtk_m4u_id which is defined by MTK_M4U_ID.
|
|
|
+ */
|
|
|
+#define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0x7)
|
|
|
+#define MTK_M4U_TO_PORT(id) ((id) & 0x1f)
|
|
|
+
|
|
|
struct mtk_iommu_domain {
|
|
|
spinlock_t pgtlock; /* lock for page table */
|
|
|
|