Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-arm/arch-pxa/uncompress.h |
| 3 | * |
| 4 | * Author: Nicolas Pitre |
| 5 | * Copyright: (C) 2001 MontaVista Software Inc. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | |
Philipp Zabel | 49db76e | 2007-11-22 17:57:30 +0100 | [diff] [blame] | 12 | #include <linux/serial_reg.h> |
| 13 | #include <asm/arch/pxa-regs.h> |
Eric Miao | 6d3dfe4 | 2008-06-02 15:58:03 +0800 | [diff] [blame] | 14 | #include <asm/mach-types.h> |
Philipp Zabel | 49db76e | 2007-11-22 17:57:30 +0100 | [diff] [blame] | 15 | |
Eric Miao | 6d3dfe4 | 2008-06-02 15:58:03 +0800 | [diff] [blame] | 16 | #define __REG(x) ((volatile unsigned long *)x) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
Eric Miao | 6d3dfe4 | 2008-06-02 15:58:03 +0800 | [diff] [blame] | 18 | static volatile unsigned long *UART = FFUART; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | |
Russell King | a081568 | 2006-03-28 10:24:33 +0100 | [diff] [blame] | 20 | static inline void putc(char c) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | { |
Philipp Zabel | 49db76e | 2007-11-22 17:57:30 +0100 | [diff] [blame] | 22 | if (!(UART[UART_IER] & IER_UUE)) |
| 23 | return; |
| 24 | while (!(UART[UART_LSR] & LSR_TDRQ)) |
Russell King | a081568 | 2006-03-28 10:24:33 +0100 | [diff] [blame] | 25 | barrier(); |
Philipp Zabel | 49db76e | 2007-11-22 17:57:30 +0100 | [diff] [blame] | 26 | UART[UART_TX] = c; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | /* |
| 30 | * This does not append a newline |
| 31 | */ |
Russell King | a081568 | 2006-03-28 10:24:33 +0100 | [diff] [blame] | 32 | static inline void flush(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | } |
| 35 | |
Eric Miao | 6d3dfe4 | 2008-06-02 15:58:03 +0800 | [diff] [blame] | 36 | static inline void arch_decomp_setup(void) |
| 37 | { |
| 38 | if (machine_is_littleton()) |
| 39 | UART = STUART; |
| 40 | } |
| 41 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | /* |
| 43 | * nothing to do |
| 44 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #define arch_decomp_wdog() |