diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/mach/map.h | 2 | ||||
-rw-r--r-- | arch/arm/kernel/tcm.c | 5 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 13 |
3 files changed, 17 insertions, 3 deletions
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index 742c2aaeb020..d2fedb5aeb1f 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -27,6 +27,8 @@ struct map_desc { | |||
27 | #define MT_MEMORY 9 | 27 | #define MT_MEMORY 9 |
28 | #define MT_ROM 10 | 28 | #define MT_ROM 10 |
29 | #define MT_MEMORY_NONCACHED 11 | 29 | #define MT_MEMORY_NONCACHED 11 |
30 | #define MT_MEMORY_DTCM 12 | ||
31 | #define MT_MEMORY_ITCM 13 | ||
30 | 32 | ||
31 | #ifdef CONFIG_MMU | 33 | #ifdef CONFIG_MMU |
32 | extern void iotable_init(struct map_desc *, int); | 34 | extern void iotable_init(struct map_desc *, int); |
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c index e50303868f1b..0c62aa2c86ea 100644 --- a/arch/arm/kernel/tcm.c +++ b/arch/arm/kernel/tcm.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
14 | #include <linux/genalloc.h> | 14 | #include <linux/genalloc.h> |
15 | #include <linux/string.h> /* memcpy */ | 15 | #include <linux/string.h> /* memcpy */ |
16 | #include <asm/page.h> /* PAGE_SHIFT */ | ||
17 | #include <asm/cputype.h> | 16 | #include <asm/cputype.h> |
18 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
19 | #include <mach/memory.h> | 18 | #include <mach/memory.h> |
@@ -53,7 +52,7 @@ static struct map_desc dtcm_iomap[] __initdata = { | |||
53 | .virtual = DTCM_OFFSET, | 52 | .virtual = DTCM_OFFSET, |
54 | .pfn = __phys_to_pfn(DTCM_OFFSET), | 53 | .pfn = __phys_to_pfn(DTCM_OFFSET), |
55 | .length = (DTCM_END - DTCM_OFFSET + 1), | 54 | .length = (DTCM_END - DTCM_OFFSET + 1), |
56 | .type = MT_UNCACHED | 55 | .type = MT_MEMORY_DTCM |
57 | } | 56 | } |
58 | }; | 57 | }; |
59 | 58 | ||
@@ -62,7 +61,7 @@ static struct map_desc itcm_iomap[] __initdata = { | |||
62 | .virtual = ITCM_OFFSET, | 61 | .virtual = ITCM_OFFSET, |
63 | .pfn = __phys_to_pfn(ITCM_OFFSET), | 62 | .pfn = __phys_to_pfn(ITCM_OFFSET), |
64 | .length = (ITCM_END - ITCM_OFFSET + 1), | 63 | .length = (ITCM_END - ITCM_OFFSET + 1), |
65 | .type = MT_UNCACHED | 64 | .type = MT_MEMORY_ITCM |
66 | } | 65 | } |
67 | }; | 66 | }; |
68 | 67 | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 285894171186..e53480148c05 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -258,6 +258,19 @@ static struct mem_type mem_types[] = { | |||
258 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, | 258 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, |
259 | .domain = DOMAIN_KERNEL, | 259 | .domain = DOMAIN_KERNEL, |
260 | }, | 260 | }, |
261 | [MT_MEMORY_DTCM] = { | ||
262 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | | ||
263 | L_PTE_DIRTY | L_PTE_WRITE, | ||
264 | .prot_l1 = PMD_TYPE_TABLE, | ||
265 | .prot_sect = PMD_TYPE_SECT | PMD_SECT_XN, | ||
266 | .domain = DOMAIN_KERNEL, | ||
267 | }, | ||
268 | [MT_MEMORY_ITCM] = { | ||
269 | .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | | ||
270 | L_PTE_USER | L_PTE_EXEC, | ||
271 | .prot_l1 = PMD_TYPE_TABLE, | ||
272 | .domain = DOMAIN_IO, | ||
273 | }, | ||
261 | }; | 274 | }; |
262 | 275 | ||
263 | const struct mem_type *get_mem_type(unsigned int type) | 276 | const struct mem_type *get_mem_type(unsigned int type) |