From 0ea1293009826da45e1019f45dfde1e557bb30df Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Tue, 6 Jul 2010 18:30:06 +0800 Subject: arm: return both physical and virtual addresses from addruart Rather than checking the MMU status in every instance of addruart, do it once in kernel/debug.S, and change the existing addruart macros to return both physical and virtual addresses. The main debug code can then select the appropriate address to use. This will also allow us to retreive the address of a uart for the MMU state that we're not current in. Updated with fixes for OMAP from Jason Wang and Tony Lindgren , and fix for versatile express from Lorenzo Pieralisi . Signed-off-by: Jeremy Kerr Signed-off-by: Lorenzo Pieralisi Signed-off-by: Jason Wang Signed-off-by: Tony Lindgren Tested-by: Kevin Hilman --- arch/arm/mach-versatile/include/mach/debug-macro.S | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-versatile') diff --git a/arch/arm/mach-versatile/include/mach/debug-macro.S b/arch/arm/mach-versatile/include/mach/debug-macro.S index 6fea7199c62..eb2cf7dc5c4 100644 --- a/arch/arm/mach-versatile/include/mach/debug-macro.S +++ b/arch/arm/mach-versatile/include/mach/debug-macro.S @@ -11,13 +11,11 @@ * */ - .macro addruart, rx, tmp - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - moveq \rx, #0x10000000 - movne \rx, #0xf1000000 @ virtual base - orr \rx, \rx, #0x001F0000 - orr \rx, \rx, #0x00001000 + .macro addruart, rp, rv + mov \rp, #0x001F0000 + orr \rp, \rp, #0x00001000 + orr \rv, \rp, #0xf1000000 @ virtual base + orr \rp, \rp, #0x10000000 @ physical base .endm #include -- cgit v1.2.3