arm: add MT_DEVICE_STRONGLY_ORDERED mem type
author黄涛 <huangtao@rock-chips.com>
Fri, 19 Aug 2011 02:06:21 +0000 (10:06 +0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 19 Aug 2011 02:06:21 +0000 (10:06 +0800)
arch/arm/include/asm/mach/map.h
arch/arm/mm/mmu.c

index 742c2aaeb02031d4d4e77dbf11e653910887343b..1f8efc90ded25aa9dec73ee5c49efbf4eb8c2783 100644 (file)
@@ -27,6 +27,7 @@ struct map_desc {
 #define MT_MEMORY              9
 #define MT_ROM                 10
 #define MT_MEMORY_NONCACHED    11
+#define MT_DEVICE_STRONGLY_ORDERED     12
 
 #ifdef CONFIG_MMU
 extern void iotable_init(struct map_desc *, int);
index 36f521e710c0bfcabffc8b4e10f67ef706e0aa65..9c9a47a2f9ba4b9f2d7ef42420db0f57f209b2a2 100644 (file)
@@ -212,6 +212,12 @@ static struct mem_type mem_types[] = {
                .prot_l1        = PMD_TYPE_TABLE,
                .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_WB,
                .domain         = DOMAIN_IO,
+       },
+       [MT_DEVICE_STRONGLY_ORDERED] = {  /* Guaranteed strongly ordered */
+               .prot_pte       = PROT_PTE_DEVICE,
+               .prot_l1        = PMD_TYPE_TABLE,
+               .prot_sect      = PROT_SECT_DEVICE | PMD_SECT_UNCACHED,
+               .domain         = DOMAIN_IO,
        },      
        [MT_DEVICE_WC] = {      /* ioremap_wc */
                .prot_pte       = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC,
@@ -338,6 +344,7 @@ static void __init build_mem_type_table(void)
                        mem_types[MT_DEVICE_NONSHARED].prot_sect |= PMD_SECT_XN;
                        mem_types[MT_DEVICE_CACHED].prot_sect |= PMD_SECT_XN;
                        mem_types[MT_DEVICE_WC].prot_sect |= PMD_SECT_XN;
+                       mem_types[MT_DEVICE_STRONGLY_ORDERED].prot_sect |= PMD_SECT_XN;
                }
                if (cpu_arch >= CPU_ARCH_ARMv7 && (cr & CR_TRE)) {
                        /*