[COMMON] include: add definition for TLB port setting
authorJanghyuck Kim <janghyuck.kim@samsung.com>
Tue, 8 Nov 2016 11:33:51 +0000 (20:33 +0900)
committerSangwook Ju <sw.ju@samsung.com>
Mon, 14 May 2018 10:45:19 +0000 (19:45 +0900)
Change-Id: I49560e481edc20b8134861f9314cbda19cb48925
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
include/dt-bindings/sysmmu/sysmmu.h

index b972dc086fee1da23a1528b92524d292bded108b..502a009648f76dd871042f3fbc4de63ae743b9db 100644 (file)
@@ -37,6 +37,8 @@
 #define _PREFETCH_ENABLE               (0x1 << 1)
 #define _PREFETCH_DISABLE              (0x0 << 1)
 
+#define _PORT_MASK(pmask)              ((pmask) << 16)
+
 /*
  * Use below definitions for TLB properties setting.
  *
        (_PRIVATE_WAY_ADDR | _TARGET_READWRITE | _PREFETCH_DISABLE)
 #define SYSMMU_PRIV_ADDR_PREFETCH_ASCENDING_READ       \
        (_PRIVATE_WAY_ADDR | _TARGET_READ | _DIR_ASCENDING | _PREFETCH_ENABLE)
+
+/* PORT_TYPE_DEFINE: Definition for TLB port dedication "configuration". */
+#define SYSMMU_PORT_NO_PREFETCH_READ(pmask)            \
+       ( _PORT_MASK(pmask) | _TARGET_READ | _PREFETCH_DISABLE)
+#define SYSMMU_PORT_NO_PREFETCH_WRITE(pmask)           \
+       ( _PORT_MASK(pmask) | _TARGET_WRITE | _PREFETCH_DISABLE)
+#define SYSMMU_PORT_NO_PREFETCH_READWRITE(pmask)       \
+       ( _PORT_MASK(pmask) | _TARGET_READWRITE | _PREFETCH_DISABLE)
+#define SYSMMU_PORT_PREFETCH_PREDICTION_READ(pmask)    \
+       ( _PORT_MASK(pmask) | _TARGET_READ | _DIR_PREDICTION | _PREFETCH_ENABLE)
+#define SYSMMU_PORT_PREFETCH_PREDICTION_WRITE(pmask)   \
+       ( _PORT_MASK(pmask) | _TARGET_WRITE | _DIR_PREDICTION | _PREFETCH_ENABLE)
+
 #endif /* _DT_BINDINGS_EXYNOS_SYSTEM_MMU_H */