From 067173526c3bbc2eaeefcf6b7b2a9d998b9e8042 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 4 Sep 2010 16:14:20 +0100 Subject: ARM: Provide common header for hard_smp_processor_id() Provide a common header to read the SMP CPU number from the MPIDR. Signed-off-by: Russell King --- arch/arm/mach-tegra/include/mach/smp.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/smp.h b/arch/arm/mach-tegra/include/mach/smp.h index 8b42dab79a70..e4a34a35a544 100644 --- a/arch/arm/mach-tegra/include/mach/smp.h +++ b/arch/arm/mach-tegra/include/mach/smp.h @@ -1,16 +1,8 @@ #ifndef ASMARM_ARCH_SMP_H #define ASMARM_ARCH_SMP_H - #include - -#define hard_smp_processor_id() \ - ({ \ - unsigned int cpunum; \ - __asm__("mrc p15, 0, %0, c0, c0, 5" \ - : "=r" (cpunum)); \ - cpunum &= 0x0F; \ - }) +#include /* * We use IRQ1 as the IPI -- cgit v1.2.3 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-tegra/include/mach/debug-macro.S | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S index 55a39564b43c..8ea3bffb4e00 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/mach-tegra/include/mach/debug-macro.S @@ -20,24 +20,28 @@ #include - .macro addruart,rx, tmp - mrc p15, 0, \rx, c1, c0 - tst \rx, #1 @ MMU enabled? - ldreq \rx, =IO_APB_PHYS @ physical - ldrne \rx, =IO_APB_VIRT @ virtual + .macro addruart, rp, rv + ldreq \rp, =IO_APB_PHYS @ physical + ldrne \rv, =IO_APB_VIRT @ virtual #if defined(CONFIG_TEGRA_DEBUG_UART_NONE) #error "A debug UART must be selected in the kernel config to use DEBUG_LL" #elif defined(CONFIG_TEGRA_DEBUG_UARTA) - orr \rx, \rx, #0x6000 + orr \rp, \rp, #0x6000 + orr \rv, \rv, #0x6000 #elif defined(CONFIG_TEGRA_DEBUG_UARTB) - ldr \tmp, =0x6040 - orr \rx, \rx, \tmp + orr \rp, \rp, #0x6000 + orr \rp, \rp, #0x40 + orr \rv, \rv, #0x6000 + orr \rv, \rv, #0x40 #elif defined(CONFIG_TEGRA_DEBUG_UARTC) - orr \rx, \rx, #0x6200 + orr \rp, \rp, #0x6200 + orr \rv, \rv, #0x6200 #elif defined(CONFIG_TEGRA_DEBUG_UARTD) - orr \rx, \rx, #0x6300 + orr \rp, \rp, #0x6300 + orr \rv, \rv, #0x6300 #elif defined(CONFIG_TEGRA_DEBUG_UARTE) - orr \rx, \rx, #0x6400 + orr \rp, \rp, #0x6400 + orr \rv, \rv, #0x6400 #endif .endm -- cgit v1.2.3