aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/include/mach/uncompress.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/uncompress.h')
-rw-r--r--arch/arm/mach-tegra/include/mach/uncompress.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/include/mach/uncompress.h b/arch/arm/mach-tegra/include/mach/uncompress.h
index 6c087b6974b2..b066ba0ee3c3 100644
--- a/arch/arm/mach-tegra/include/mach/uncompress.h
+++ b/arch/arm/mach-tegra/include/mach/uncompress.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2010 Google, Inc. 4 * Copyright (C) 2010 Google, Inc.
5 * Copyright (C) 2011 Google, Inc. 5 * Copyright (C) 2011 Google, Inc.
6 * Copyright (C) 2011 NVIDIA CORPORATION. All Rights Reserved. 6 * Copyright (C) 2011-2012 NVIDIA CORPORATION. All Rights Reserved.
7 * 7 *
8 * Author: 8 * Author:
9 * Colin Cross <ccross@google.com> 9 * Colin Cross <ccross@google.com>
@@ -30,6 +30,7 @@
30#include <linux/serial_reg.h> 30#include <linux/serial_reg.h>
31 31
32#include <mach/iomap.h> 32#include <mach/iomap.h>
33#include <mach/irammap.h>
33 34
34#define DEBUG_UART_SHIFT 2 35#define DEBUG_UART_SHIFT 2
35 36
@@ -49,6 +50,17 @@ static inline void flush(void)
49{ 50{
50} 51}
51 52
53static inline void save_uart_address(void)
54{
55 u32 *buf = (u32 *)(TEGRA_IRAM_BASE + TEGRA_IRAM_DEBUG_UART_OFFSET);
56
57 if (uart) {
58 buf[0] = TEGRA_IRAM_DEBUG_UART_COOKIE;
59 buf[1] = (u32)uart;
60 } else
61 buf[0] = 0;
62}
63
52/* 64/*
53 * Setup before decompression. This is where we do UART selection for 65 * Setup before decompression. This is where we do UART selection for
54 * earlyprintk and init the uart_base register. 66 * earlyprintk and init the uart_base register.
@@ -125,6 +137,7 @@ static inline void arch_decomp_setup(void)
125 } 137 }
126 if (i == ARRAY_SIZE(uarts)) 138 if (i == ARRAY_SIZE(uarts))
127 uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE; 139 uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE;
140 save_uart_address();
128 if (uart == NULL) 141 if (uart == NULL)
129 return; 142 return;
130 143