diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-17 11:28:31 -0400 |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-17 11:28:31 -0400 |
commit | cc56449f53ba45646c6f0a2edf77c4acb342caed (patch) | |
tree | c48feb9407191d61041a59dabcaf92c185eff64c | |
parent | 684f970e2fd2dc0eb8292500903f54f1ebda0e75 (diff) |
[PATCH] ARM: fix debug macros
Fix debug EBSA285 and RiscPC debugging macros to detect whether the
MMU is enabled.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r-- | include/asm-arm/arch-ebsa285/debug-macro.S | 7 | ||||
-rw-r--r-- | include/asm-arm/arch-rpc/debug-macro.S | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S index 237853db6e2f..97d15fc629af 100644 --- a/include/asm-arm/arch-ebsa285/debug-macro.S +++ b/include/asm-arm/arch-ebsa285/debug-macro.S | |||
@@ -45,9 +45,12 @@ | |||
45 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 45 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
46 | 46 | ||
47 | .macro addruart,rx | 47 | .macro addruart,rx |
48 | mov \rx, #dc21285_high | 48 | mrc p15, 0, \rx, c1, c0 |
49 | tst \rx, #1 @ MMU enabled? | ||
50 | moveq \rx, #0x42000000 | ||
51 | movne \rx, #dc21285_high | ||
49 | .if dc21285_low | 52 | .if dc21285_low |
50 | orr \rx, \rx, #dc21285_low | 53 | orrne \rx, \rx, #dc21285_low |
51 | .endif | 54 | .endif |
52 | .endm | 55 | .endm |
53 | 56 | ||
diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S index 0711828164cd..456d3d754c3d 100644 --- a/include/asm-arm/arch-rpc/debug-macro.S +++ b/include/asm-arm/arch-rpc/debug-macro.S | |||
@@ -12,7 +12,10 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | .macro addruart,rx | 14 | .macro addruart,rx |
15 | mov \rx, #0xe0000000 | 15 | mrc p15, 0, \rx, c1, c0 |
16 | tst \rx, #1 @ MMU enabled? | ||
17 | moveq \rx, #0x03000000 | ||
18 | movne \rx, #0xe0000000 | ||
16 | orr \rx, \rx, #0x00010000 | 19 | orr \rx, \rx, #0x00010000 |
17 | orr \rx, \rx, #0x00000fe0 | 20 | orr \rx, \rx, #0x00000fe0 |
18 | .endm | 21 | .endm |