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-lpc32xx/include/mach/debug-macro.S | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-lpc32xx') diff --git a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S index 621744d6b152..629e744aeb9e 100644 --- a/arch/arm/mach-lpc32xx/include/mach/debug-macro.S +++ b/arch/arm/mach-lpc32xx/include/mach/debug-macro.S @@ -20,11 +20,9 @@ * Debug output is hardcoded to standard UART 5 */ - .macro addruart,rx, tmp - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - ldreq \rx, =0x40090000 - ldrne \rx, =0xF4090000 + .macro addruart, rp, rv + ldreq \rp, =0x40090000 + ldrne \rv, =0xF4090000 .endm #define UART_SHIFT 2 -- cgit v1.2.1 From 6451d7783ba5ff24eb1a544eaa6665b890f30466 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Thu, 14 Oct 2010 22:21:46 -0400 Subject: arm: remove machine_desc.io_pg_offst and .phys_io Since we're now using addruart to establish the debug mapping, we can remove the io_pg_offst and phys_io members of struct machine_desc. The various declarations were removed using the following script: grep -rl MACHINE_START arch/arm | xargs \ sed -i '/MACHINE_START/,/MACHINE_END/ { /\.\(phys_io\|io_pg_offst\)/d }' [ Initial patch was from Jeremy Kerr, example script from Russell King ] Signed-off-by: Nicolas Pitre Acked-by: Eric Miao --- arch/arm/mach-lpc32xx/phy3250.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/arm/mach-lpc32xx') diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c index bc9a42da2145..a058de858907 100644 --- a/arch/arm/mach-lpc32xx/phy3250.c +++ b/arch/arm/mach-lpc32xx/phy3250.c @@ -387,8 +387,6 @@ arch_initcall(lpc32xx_display_uid); MACHINE_START(PHY3250, "Phytec 3250 board with the LPC3250 Microcontroller") /* Maintainer: Kevin Wells, NXP Semiconductors */ - .phys_io = LPC32XX_UART5_BASE, - .io_pg_offst = ((IO_ADDRESS(LPC32XX_UART5_BASE))>>18) & 0xfffc, .boot_params = 0x80000100, .map_io = lpc32xx_map_io, .init_irq = lpc32xx_init_irq, -- cgit v1.2.1