Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 1 | /* |
| 2 | * include/asm-arm/arch-ixp23xx/uncompress.h |
| 3 | * |
| 4 | * Copyright (C) 2002-2004 Intel Corporation. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
| 12 | #define __ASM_ARCH_UNCOMPRESS_H |
| 13 | |
Lennert Buytenhek | 02c4293 | 2006-06-27 22:56:16 +0100 | [diff] [blame] | 14 | #include <asm/arch/ixp23xx.h> |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 15 | #include <linux/serial_reg.h> |
| 16 | |
| 17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) |
| 18 | |
Lennert Buytenhek | cc3d48d | 2006-03-30 10:51:44 +0100 | [diff] [blame] | 19 | static inline void putc(char c) |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 20 | { |
| 21 | int j; |
| 22 | |
| 23 | for (j = 0; j < 0x1000; j++) { |
| 24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) |
| 25 | break; |
Lennert Buytenhek | cc3d48d | 2006-03-30 10:51:44 +0100 | [diff] [blame] | 26 | barrier(); |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | UART_BASE[UART_TX] = c; |
| 30 | } |
| 31 | |
Lennert Buytenhek | cc3d48d | 2006-03-30 10:51:44 +0100 | [diff] [blame] | 32 | static inline void flush(void) |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 33 | { |
Lennert Buytenhek | c471307 | 2006-03-28 21:18:54 +0100 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | #define arch_decomp_setup() |
| 37 | #define arch_decomp_wdog() |
| 38 | |
| 39 | |
| 40 | #endif |