ARM: tegra: uncompress.h: Store UART address in a variable
authorDoug Anderson <dianders@chromium.org>
Fri, 6 Jan 2012 10:43:20 +0000 (10:43 +0000)
committerOlof Johansson <olof@lixom.net>
Tue, 7 Feb 2012 02:25:00 +0000 (18:25 -0800)
This will allow a future change to auto-detect which UART to use.

Signed-off-by: Doug Anderson <dianders@chromium.org>
[swarren: Extracted from a larger patch by Doug]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Doug Anderson <dianders@chromium.org>
Acked-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-tegra/include/mach/uncompress.h

index 9797279..bb3fd35 100644 (file)
 
 #define DEBUG_UART_SHIFT 2
 
+volatile u8 *uart;
+
 static void putc(int c)
 {
-       volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
-
        if (uart == NULL)
                return;
 
@@ -50,8 +50,8 @@ static inline void arch_decomp_setup(void)
 {
        volatile u32 *apb_misc = (volatile u32 *)TEGRA_APB_MISC_BASE;
        u32 chip, div;
-       volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
 
+       uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
        if (uart == NULL)
                return;