@@ -56,6 +56,7 @@
#define L2_AUX_VAL 0x7C470001
#define L2_AUX_MASK 0xC200ffff
+volatile u32 exynos_uart_base = 1;
static const char name_exynos4210[] = "EXYNOS4210";
static const char name_exynos4212[] = "EXYNOS4212";
static const char name_exynos4412[] = "EXYNOS4412";
@@ -21,6 +21,16 @@
*/
.macro addruart, rp, rv, tmp
+ adr \rp, 100f
+ ldr \rv, [\rp]
+ sub \rv, \rv, \rp
+ ldr \rp, [\rp, #4]
+ sub \tmp, \rp, \rv
+ ldr \rp, [\tmp]
+
+ teq \rp, #1
+ bne 101f
+
mov \rp, #0x10000000
ldr \rp, [\rp, #0]
and \rp, \rp, #0x0ff00000
@@ -38,7 +48,14 @@
b 99f
54: mov \rp, #EXYNOS5440_PA_UART
b 99f
-99: ldr \rv, =S3C_VA_UART
+
+ .align
+100: .word .
+ .word exynos_uart_base
+ .ltorg
+
+99: str \rp, [\tmp]
+101: ldr \rv, =S3C_VA_UART
#if CONFIG_DEBUG_S3C_UART != 0
add \rp, \rp, #(0x10000 * CONFIG_DEBUG_S3C_UART)
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> --- arch/arm/mach-exynos/common.c | 1 + arch/arm/mach-exynos/include/mach/debug-macro.S | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletions(-)