1f990734c84960ac0558538c2f3008837d171ca2
[openwrt/openwrt.git] /
1 From 395718e9f6445369089dba16fa50182c5e0528f5 Mon Sep 17 00:00:00 2001
2 From: Jianhua Xie <jianhua.xie@nxp.com>
3 Date: Fri, 29 Jan 2016 16:40:46 +0800
4 Subject: [PATCH] arm: add pgprot_cached and pgprot_cached_ns support
5
6 Signed-off-by: Jianhua Xie <jianhua.xie@nxp.com>
7 ---
8 arch/arm/include/asm/pgtable.h | 7 +++++++
9 1 file changed, 7 insertions(+)
10
11 --- a/arch/arm/include/asm/pgtable.h
12 +++ b/arch/arm/include/asm/pgtable.h
13 @@ -116,6 +116,13 @@ extern pgprot_t pgprot_s2_device;
14 #define pgprot_noncached(prot) \
15 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)
16
17 +#define pgprot_cached(prot) \
18 + __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_CACHED)
19 +
20 +#define pgprot_cached_ns(prot) \
21 + __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_CACHED | \
22 + L_PTE_MT_DEV_NONSHARED)
23 +
24 #define pgprot_writecombine(prot) \
25 __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE)
26