From: Russell King Date: Sun, 17 Apr 2005 15:28:31 +0000 (+0100) Subject: [PATCH] ARM: fix debug macros X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cc56449f53ba45646c6f0a2edf77c4acb342caed;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [PATCH] ARM: fix debug macros Fix debug EBSA285 and RiscPC debugging macros to detect whether the MMU is enabled. Signed-off-by: Russell King --- diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S index 237853db6e2..97d15fc629a 100644 --- a/include/asm-arm/arch-ebsa285/debug-macro.S +++ b/include/asm-arm/arch-ebsa285/debug-macro.S @@ -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 diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S index 0711828164c..456d3d754c3 100644 --- a/include/asm-arm/arch-rpc/debug-macro.S +++ b/include/asm-arm/arch-rpc/debug-macro.S @@ -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