1 /* 2 * arch/arm/mach-tegra/include/mach/uncompress.h 3 * 4 * Copyright (C) 2010 Google, Inc. 5 * 6 * Author: 7 * Colin Cross <ccross@google.com> 8 * Erik Gilling <konkers@google.com> 9 * 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. 13 * 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. 18 * 19 */ 20 21 #ifndef __MACH_TEGRA_UNCOMPRESS_H 22 #define __MACH_TEGRA_UNCOMPRESS_H 23 24 #include <linux/types.h> 25 #include <linux/serial_reg.h> 26 27 #include <mach/iomap.h> 28 putc(int c)29static void putc(int c) 30 { 31 volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE; 32 int shift = 2; 33 34 if (uart == NULL) 35 return; 36 37 while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) 38 barrier(); 39 uart[UART_TX << shift] = c; 40 } 41 flush(void)42static inline void flush(void) 43 { 44 } 45 arch_decomp_setup(void)46static inline void arch_decomp_setup(void) 47 { 48 volatile u8 *uart = (volatile u8 *)TEGRA_DEBUG_UART_BASE; 49 int shift = 2; 50 51 if (uart == NULL) 52 return; 53 54 uart[UART_LCR << shift] |= UART_LCR_DLAB; 55 uart[UART_DLL << shift] = 0x75; 56 uart[UART_DLM << shift] = 0x0; 57 uart[UART_LCR << shift] = 3; 58 } 59 arch_decomp_wdog(void)60static inline void arch_decomp_wdog(void) 61 { 62 } 63 64 #endif 65