aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/proc-v7.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 16:42:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-14 16:42:43 -0400
commit2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch)
treee35a625496acc6ac852846d40b8851186b9d1ac4 /arch/arm/mm/proc-v7.S
parent44b7532b8b464f606053562400719c9c21276037 (diff)
parentce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits) MAINTAINERS: EB110ATX is not ebsa110 MAINTAINERS: update Eric Miao's email address and status fb: add support of LCD display controller on pxa168/910 (base layer) [ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN [ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines [ARM] 5544/1: Trust PrimeCell resource sizes [ARM] pxa/sharpsl_pm: cleanup of gpio-related code. [ARM] pxa/sharpsl_pm: drop set_irq_type calls [ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one [ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific [ARM] sa1100: remove unused collie_pm.c [ARM] pxa: fix the conflicting non-static declarations of global_gpios[] [ARM] 5550/1: Add default configure file for w90p910 platform [ARM] 5549/1: Add clock api for w90p910 platform. [ARM] 5548/1: Add gpio api for w90p910 platform [ARM] 5551/1: Add multi-function pin api for w90p910 platform. [ARM] Make ARM_VIC_NR depend on ARM_VIC [ARM] 5546/1: ARM PL022 SSP/SPI driver v3 ARM: OMAP4: SMP: Update defconfig for OMAP4430 ARM: OMAP4: SMP: Enable SMP support for OMAP4430 ...
Diffstat (limited to 'arch/arm/mm/proc-v7.S')
-rw-r--r--arch/arm/mm/proc-v7.S59
1 files changed, 48 insertions, 11 deletions
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index a08d9d2380d3..180a08d03a03 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -19,17 +19,23 @@
19 19
20#include "proc-macros.S" 20#include "proc-macros.S"
21 21
22#define TTB_C (1 << 0)
23#define TTB_S (1 << 1) 22#define TTB_S (1 << 1)
24#define TTB_RGN_NC (0 << 3) 23#define TTB_RGN_NC (0 << 3)
25#define TTB_RGN_OC_WBWA (1 << 3) 24#define TTB_RGN_OC_WBWA (1 << 3)
26#define TTB_RGN_OC_WT (2 << 3) 25#define TTB_RGN_OC_WT (2 << 3)
27#define TTB_RGN_OC_WB (3 << 3) 26#define TTB_RGN_OC_WB (3 << 3)
27#define TTB_NOS (1 << 5)
28#define TTB_IRGN_NC ((0 << 0) | (0 << 6))
29#define TTB_IRGN_WBWA ((0 << 0) | (1 << 6))
30#define TTB_IRGN_WT ((1 << 0) | (0 << 6))
31#define TTB_IRGN_WB ((1 << 0) | (1 << 6))
28 32
29#ifndef CONFIG_SMP 33#ifndef CONFIG_SMP
30#define TTB_FLAGS TTB_C|TTB_RGN_OC_WB @ mark PTWs cacheable, outer WB 34/* PTWs cacheable, inner WB not shareable, outer WB not shareable */
35#define TTB_FLAGS TTB_IRGN_WB|TTB_RGN_OC_WB
31#else 36#else
32#define TTB_FLAGS TTB_C|TTB_S|TTB_RGN_OC_WBWA @ mark PTWs cacheable and shared, outer WBWA 37/* PTWs cacheable, inner WBWA shareable, outer WBWA not shareable */
38#define TTB_FLAGS TTB_IRGN_WBWA|TTB_S|TTB_NOS|TTB_RGN_OC_WBWA
33#endif 39#endif
34 40
35ENTRY(cpu_v7_proc_init) 41ENTRY(cpu_v7_proc_init)
@@ -176,8 +182,8 @@ cpu_v7_name:
176 */ 182 */
177__v7_setup: 183__v7_setup:
178#ifdef CONFIG_SMP 184#ifdef CONFIG_SMP
179 mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode 185 mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode and
180 orr r0, r0, #(0x1 << 6) 186 orr r0, r0, #(1 << 6) | (1 << 0) @ TLB ops broadcasting
181 mcr p15, 0, r0, c1, c0, 1 187 mcr p15, 0, r0, c1, c0, 1
182#endif 188#endif
183 adr r12, __v7_setup_stack @ the local stack 189 adr r12, __v7_setup_stack @ the local stack
@@ -227,12 +233,43 @@ __v7_setup:
227 mov r10, #0x1f @ domains 0, 1 = manager 233 mov r10, #0x1f @ domains 0, 1 = manager
228 mcr p15, 0, r10, c3, c0, 0 @ load domain access register 234 mcr p15, 0, r10, c3, c0, 0 @ load domain access register
229#endif 235#endif
230 ldr r5, =0xff0aa1a8 236 /*
231 ldr r6, =0x40e040e0 237 * Memory region attributes with SCTLR.TRE=1
238 *
239 * n = TEX[0],C,B
240 * TR = PRRR[2n+1:2n] - memory type
241 * IR = NMRR[2n+1:2n] - inner cacheable property
242 * OR = NMRR[2n+17:2n+16] - outer cacheable property
243 *
244 * n TR IR OR
245 * UNCACHED 000 00
246 * BUFFERABLE 001 10 00 00
247 * WRITETHROUGH 010 10 10 10
248 * WRITEBACK 011 10 11 11
249 * reserved 110
250 * WRITEALLOC 111 10 01 01
251 * DEV_SHARED 100 01
252 * DEV_NONSHARED 100 01
253 * DEV_WC 001 10
254 * DEV_CACHED 011 10
255 *
256 * Other attributes:
257 *
258 * DS0 = PRRR[16] = 0 - device shareable property
259 * DS1 = PRRR[17] = 1 - device shareable property
260 * NS0 = PRRR[18] = 0 - normal shareable property
261 * NS1 = PRRR[19] = 1 - normal shareable property
262 * NOS = PRRR[24+n] = 1 - not outer shareable
263 */
264 ldr r5, =0xff0a81a8 @ PRRR
265 ldr r6, =0x40e040e0 @ NMRR
232 mcr p15, 0, r5, c10, c2, 0 @ write PRRR 266 mcr p15, 0, r5, c10, c2, 0 @ write PRRR
233 mcr p15, 0, r6, c10, c2, 1 @ write NMRR 267 mcr p15, 0, r6, c10, c2, 1 @ write NMRR
234 adr r5, v7_crval 268 adr r5, v7_crval
235 ldmia r5, {r5, r6} 269 ldmia r5, {r5, r6}
270#ifdef CONFIG_CPU_ENDIAN_BE8
271 orr r6, r6, #1 << 25 @ big-endian page tables
272#endif
236 mrc p15, 0, r0, c1, c0, 0 @ read control register 273 mrc p15, 0, r0, c1, c0, 0 @ read control register
237 bic r0, r0, r5 @ clear bits them 274 bic r0, r0, r5 @ clear bits them
238 orr r0, r0, r6 @ set them 275 orr r0, r0, r6 @ set them
@@ -240,14 +277,14 @@ __v7_setup:
240ENDPROC(__v7_setup) 277ENDPROC(__v7_setup)
241 278
242 /* AT 279 /* AT
243 * TFR EV X F I D LR 280 * TFR EV X F I D LR S
244 * .EEE ..EE PUI. .T.T 4RVI ZFRS BLDP WCAM 281 * .EEE ..EE PUI. .T.T 4RVI ZWRS BLDP WCAM
245 * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced 282 * rxxx rrxx xxx0 0101 xxxx xxxx x111 xxxx < forced
246 * 1 0 110 0011 1.00 .111 1101 < we want 283 * 1 0 110 0011 1100 .111 1101 < we want
247 */ 284 */
248 .type v7_crval, #object 285 .type v7_crval, #object
249v7_crval: 286v7_crval:
250 crval clear=0x0120c302, mmuset=0x10c0387d, ucset=0x00c0187c 287 crval clear=0x0120c302, mmuset=0x10c03c7d, ucset=0x00c01c7c
251 288
252__v7_setup_stack: 289__v7_setup_stack:
253 .space 4 * 11 @ 11 registers 290 .space 4 * 11 @ 11 registers