GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-tegra / include / mach / uncompress.h
blob6c4dd815abd7670e0df8d2980a8d28342ba9bd54
1 /*
2 * arch/arm/mach-tegra/include/mach/uncompress.h
4 * Copyright (C) 2010 Google, Inc.
6 * Author:
7 * Colin Cross <ccross@google.com>
8 * Erik Gilling <konkers@google.com>
10 * This software is licensed under the terms of the GNU General Public
11 * License version 2, as published by the Free Software Foundation, and
12 * may be copied, distributed, and modified under those terms.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
21 #ifndef __MACH_TEGRA_UNCOMPRESS_H
22 #define __MACH_TEGRA_UNCOMPRESS_H
24 #include <linux/types.h>
25 #include <linux/serial_reg.h>
27 #include <mach/iomap.h>
29 #if defined(CONFIG_TEGRA_DEBUG_UARTA)
30 #define DEBUG_UART_BASE TEGRA_UARTA_BASE
31 #elif defined(CONFIG_TEGRA_DEBUG_UARTB)
32 #define DEBUG_UART_BASE TEGRA_UARTB_BASE
33 #elif defined(CONFIG_TEGRA_DEBUG_UARTC)
34 #define DEBUG_UART_BASE TEGRA_UARTC_BASE
35 #elif defined(CONFIG_TEGRA_DEBUG_UARTD)
36 #define DEBUG_UART_BASE TEGRA_UARTD_BASE
37 #elif defined(CONFIG_TEGRA_DEBUG_UARTE)
38 #define DEBUG_UART_BASE TEGRA_UARTE_BASE
39 #else
40 #define DEBUG_UART_BASE NULL
41 #endif
43 static void putc(int c)
45 volatile u8 *uart = (volatile u8 *)DEBUG_UART_BASE;
46 int shift = 2;
48 if (uart == NULL)
49 return;
51 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
52 barrier();
53 uart[UART_TX << shift] = c;
56 static inline void flush(void)
60 static inline void arch_decomp_setup(void)
62 volatile u8 *uart = (volatile u8 *)DEBUG_UART_BASE;
63 int shift = 2;
65 if (uart == NULL)
66 return;
68 uart[UART_LCR << shift] |= UART_LCR_DLAB;
69 uart[UART_DLL << shift] = 0x75;
70 uart[UART_DLM << shift] = 0x0;
71 uart[UART_LCR << shift] = 3;
74 static inline void arch_decomp_wdog(void)
78 #endif