]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mm/proc-v6.S
[ARM] Handle HWCAP_VFP in VFP support code
[karo-tx-linux.git] / arch / arm / mm / proc-v6.S
index ca13d4d05f6551e13fae4d9148fa7c7664e3da08..c40baf8a47f028f48426f0616f982beb10bc9c40 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
+#include <asm/elf.h>
 #include <asm/hardware/arm_scu.h>
-#include <asm/procinfo.h>
 #include <asm/pgtable-hwdef.h>
 #include <asm/pgtable.h>
 
@@ -207,16 +207,11 @@ __v6_setup:
 #endif
        mcr     p15, 0, r4, c2, c0, 1           @ load TTB1
 #endif /* CONFIG_MMU */
-#ifdef CONFIG_VFP
-       mrc     p15, 0, r0, c1, c0, 2
-       orr     r0, r0, #(0xf << 20)
-       mcr     p15, 0, r0, c1, c0, 2           @ Enable full access to VFP
-#endif
+       adr     r5, v6_crval
+       ldmia   r5, {r5, r6}
        mrc     p15, 0, r0, c1, c0, 0           @ read control register
-       ldr     r5, v6_cr1_clear                @ get mask for bits to clear
        bic     r0, r0, r5                      @ clear bits them
-       ldr     r5, v6_cr1_set                  @ get mask for bits to set
-       orr     r0, r0, r5                      @ set them
+       orr     r0, r0, r6                      @ set them
        mov     pc, lr                          @ return to head.S:__ret
 
        /*
@@ -225,12 +220,9 @@ __v6_setup:
         * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced
         *         0 110       0011 1.00 .111 1101 < we want
         */
-       .type   v6_cr1_clear, #object
-       .type   v6_cr1_set, #object
-v6_cr1_clear:
-       .word   0x01e0fb7f
-v6_cr1_set:
-       .word   0x00c0387d
+       .type   v6_crval, #object
+v6_crval:
+       crval   clear=0x01e0fb7f, mmuset=0x00c0387d, ucset=0x00c0187c
 
        .type   v6_processor_functions, #object
 ENTRY(v6_processor_functions)
@@ -269,10 +261,14 @@ __v6_proc_info:
                PMD_SECT_CACHEABLE | \
                PMD_SECT_AP_WRITE | \
                PMD_SECT_AP_READ
+       .long   PMD_TYPE_SECT | \
+               PMD_SECT_XN | \
+               PMD_SECT_AP_WRITE | \
+               PMD_SECT_AP_READ
        b       __v6_setup
        .long   cpu_arch_name
        .long   cpu_elf_name
-       .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_VFP|HWCAP_EDSP|HWCAP_JAVA
+       .long   HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA
        .long   cpu_v6_name
        .long   v6_processor_functions
        .long   v6wbi_tlb_fns