Pull button into test branch
[linux-drm-fsl-dcu.git] / arch / arm / mm / proc-arm1020.S
index cc609666df059ed88b38035e8d0ff7af90e4410c..700c04d6996ea3e646c91175747d30a5d127dff1 100644 (file)
 #include <linux/init.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/elf.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
-#include <asm/procinfo.h>
 #include <asm/ptrace.h>
 
+#include "proc-macros.S"
+
 /*
  * This is the maximum size of an area which will be invalidated
  * using the single invalidate entry instructions.  Anything larger
@@ -395,7 +397,7 @@ ENTRY(cpu_arm1020_switch_mm)
  * Set a PTE and flush it out
  */
        .align  5
-ENTRY(cpu_arm1020_set_pte)
+ENTRY(cpu_arm1020_set_pte_ext)
 #ifdef CONFIG_MMU
        str     r1, [r0], #-2048                @ linux version
 
@@ -439,11 +441,12 @@ __arm1020_setup:
 #ifdef CONFIG_MMU
        mcr     p15, 0, r0, c8, c7              @ invalidate I,D TLBs on v4
 #endif
+
+       adr     r5, arm1020_crval
+       ldmia   r5, {r5, r6}
        mrc     p15, 0, r0, c1, c0              @ get control register v4
-       ldr     r5, arm1020_cr1_clear
        bic     r0, r0, r5
-       ldr     r5, arm1020_cr1_set
-       orr     r0, r0, r5
+       orr     r0, r0, r6
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
        orr     r0, r0, #0x4000                 @ .R.. .... .... ....
 #endif
@@ -455,12 +458,9 @@ __arm1020_setup:
         * .RVI ZFRS BLDP WCAM
         * .011 1001 ..11 0101
         */
-       .type   arm1020_cr1_clear, #object
-       .type   arm1020_cr1_set, #object
-arm1020_cr1_clear:
-       .word   0x593f
-arm1020_cr1_set:
-       .word   0x3935
+       .type   arm1020_crval, #object
+arm1020_crval:
+       crval   clear=0x0000593f, mmuset=0x00003935, ucset=0x00001930
 
        __INITDATA
 
@@ -477,7 +477,7 @@ arm1020_processor_functions:
        .word   cpu_arm1020_do_idle
        .word   cpu_arm1020_dcache_clean_area
        .word   cpu_arm1020_switch_mm
-       .word   cpu_arm1020_set_pte
+       .word   cpu_arm1020_set_pte_ext
        .size   arm1020_processor_functions, . - arm1020_processor_functions
 
        .section ".rodata"
@@ -523,6 +523,9 @@ cpu_arm1020_name:
 __arm1020_proc_info:
        .long   0x4104a200                      @ ARM 1020T (Architecture v5T)
        .long   0xff0ffff0
+       .long   PMD_TYPE_SECT | \
+               PMD_SECT_AP_WRITE | \
+               PMD_SECT_AP_READ
        .long   PMD_TYPE_SECT | \
                PMD_SECT_AP_WRITE | \
                PMD_SECT_AP_READ