tree c48feb9407191d61041a59dabcaf92c185eff64c
parent 684f970e2fd2dc0eb8292500903f54f1ebda0e75
author Russell King <[EMAIL PROTECTED]> Sun, 17 Apr 2005 16:28:31 +0100
committer Russell King <[EMAIL PROTECTED]> Sun, 17 Apr 2005 16:28:31 +0100

[PATCH] ARM: fix debug macros

Fix debug EBSA285 and RiscPC debugging macros to detect whether the
MMU is enabled.

Signed-off-by: Russell King <[EMAIL PROTECTED]>

 asm-arm/arch-ebsa285/debug-macro.S |    7 +++++--
 asm-arm/arch-rpc/debug-macro.S     |    5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

Index: include/asm-arm/arch-ebsa285/debug-macro.S
===================================================================
--- 
d8736596d79bf95281449f7fe5f72db111eb5a73/include/asm-arm/arch-ebsa285/debug-macro.S
  (mode:100644 sha1:237853db6e2f46ccf034909362df7b6255573dc5)
+++ 
c48feb9407191d61041a59dabcaf92c185eff64c/include/asm-arm/arch-ebsa285/debug-macro.S
  (mode:100644 sha1:97d15fc629af867c389509b71e4da6057a0e9d83)
@@ -45,9 +45,12 @@
                .equ    dc21285_low,  ARMCSR_BASE & 0x00ffffff
 
                .macro  addruart,rx
-               mov     \rx, #dc21285_high
+               mrc     p15, 0, \rx, c1, c0
+               tst     \rx, #1                 @ MMU enabled?
+               moveq   \rx, #0x42000000
+               movne   \rx, #dc21285_high
                .if     dc21285_low
-               orr     \rx, \rx, #dc21285_low
+               orrne   \rx, \rx, #dc21285_low
                .endif
                .endm
 
Index: include/asm-arm/arch-rpc/debug-macro.S
===================================================================
--- 
d8736596d79bf95281449f7fe5f72db111eb5a73/include/asm-arm/arch-rpc/debug-macro.S 
 (mode:100644 sha1:0711828164cdadd7b78fa0490faee70dbc63a1ce)
+++ 
c48feb9407191d61041a59dabcaf92c185eff64c/include/asm-arm/arch-rpc/debug-macro.S 
 (mode:100644 sha1:456d3d754c3d0711208c06a919b94d47becdfd81)
@@ -12,7 +12,10 @@
 */
 
                .macro  addruart,rx
-               mov     \rx, #0xe0000000
+               mrc     p15, 0, \rx, c1, c0
+               tst     \rx, #1                 @ MMU enabled?
+               moveq   \rx, #0x03000000
+               movne   \rx, #0xe0000000
                orr     \rx, \rx, #0x00010000
                orr     \rx, \rx, #0x00000fe0
                .endm
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to