aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v32
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2010-08-02 12:22:09 -0400
committerJesper Nilsson <jesper.nilsson@axis.com>2010-08-04 07:00:20 -0400
commit345c52e079001354809c17f84e164827e99f2aaa (patch)
tree1cd65089ed0b0394ecd27cdc16ad63cbaf6686f3 /arch/cris/arch-v32
parentcd4f20110cf46ab7ca35ea32d601576b31abd9bb (diff)
CRIS: Additional mmu settings for ARTPEC-3
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r--arch/cris/arch-v32/kernel/head.S42
1 files changed, 40 insertions, 2 deletions
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index 76266f80a5f1..5fe1513e447a 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -69,7 +69,13 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */
69 ;; 69 ;;
70 ;; Note; 3 cycles is needed for a bank-select to take effect. Further; 70 ;; Note; 3 cycles is needed for a bank-select to take effect. Further;
71 ;; bank 1 is the instruction MMU, bank 2 is the data MMU. 71 ;; bank 1 is the instruction MMU, bank 2 is the data MMU.
72#ifndef CONFIG_ETRAX_VCS_SIM 72
73#ifdef CONFIG_CRIS_MACH_ARTPEC3
74 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \
75 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \
76 | REG_FIELD(mmu, rw_mm_kbase_hi, base_d, 5) \
77 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0
78#elif !defined(CONFIG_ETRAX_VCS_SIM)
73 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \ 79 move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \
74 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ 80 | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \
75 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 81 | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0
@@ -88,7 +94,39 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */
88 94
89 ;; Enable certain page protections and setup linear mapping 95 ;; Enable certain page protections and setup linear mapping
90 ;; for f,e,c,b,4,0. 96 ;; for f,e,c,b,4,0.
91#ifndef CONFIG_ETRAX_VCS_SIM 97
98 ;; ARTPEC-3:
99 ;; c,d used for linear kernel mapping, up to 512 MB
100 ;; e used for vmalloc
101 ;; f unused, but page mapped to get page faults
102
103 ;; ETRAX FS:
104 ;; c used for linear kernel mapping, up to 256 MB
105 ;; d used for vmalloc
106 ;; e,f used for memory-mapped NOR flash
107
108#ifdef CONFIG_CRIS_MACH_ARTPEC3
109 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \
110 | REG_STATE(mmu, rw_mm_cfg, acc, on) \
111 | REG_STATE(mmu, rw_mm_cfg, ex, on) \
112 | REG_STATE(mmu, rw_mm_cfg, inv, on) \
113 | REG_STATE(mmu, rw_mm_cfg, seg_f, page) \
114 | REG_STATE(mmu, rw_mm_cfg, seg_e, page) \
115 | REG_STATE(mmu, rw_mm_cfg, seg_d, linear) \
116 | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \
117 | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \
118 | REG_STATE(mmu, rw_mm_cfg, seg_a, page) \
119 | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \
120 | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \
121 | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \
122 | REG_STATE(mmu, rw_mm_cfg, seg_6, page) \
123 | REG_STATE(mmu, rw_mm_cfg, seg_5, page) \
124 | REG_STATE(mmu, rw_mm_cfg, seg_4, linear) \
125 | REG_STATE(mmu, rw_mm_cfg, seg_3, page) \
126 | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \
127 | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \
128 | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2
129#elif !defined(CONFIG_ETRAX_VCS_SIM)
92 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \ 130 move.d REG_STATE(mmu, rw_mm_cfg, we, on) \
93 | REG_STATE(mmu, rw_mm_cfg, acc, on) \ 131 | REG_STATE(mmu, rw_mm_cfg, acc, on) \
94 | REG_STATE(mmu, rw_mm_cfg, ex, on) \ 132 | REG_STATE(mmu, rw_mm_cfg, ex, on) \