| Bellido Nicolas | 038c5b6 | 2005-06-20 18:51:05 +0100 | [diff] [blame] | 1 | /* | 
 | 2 |  *  linux/include/asm-arm/arch-aaec2000/uncompress.h | 
 | 3 |  * | 
 | 4 |  *  Copyright (c) 2005 Nicolas Bellido Y Ortega | 
 | 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 |  | 
 | 14 | #include "hardware.h" | 
 | 15 |  | 
 | 16 | #define UART(x)         (*(volatile unsigned long *)(serial_port + (x))) | 
 | 17 |  | 
| Russell King | a081568 | 2006-03-28 10:24:33 +0100 | [diff] [blame] | 18 | static void putc(int c) | 
| Bellido Nicolas | 038c5b6 | 2005-06-20 18:51:05 +0100 | [diff] [blame] | 19 | { | 
 | 20 | 	unsigned long serial_port; | 
 | 21 |         do { | 
 | 22 | 		serial_port = _UART3_BASE; | 
 | 23 | 		if (UART(UART_CR) & UART_CR_EN) break; | 
 | 24 | 		serial_port = _UART1_BASE; | 
 | 25 | 		if (UART(UART_CR) & UART_CR_EN) break; | 
 | 26 | 		serial_port = _UART2_BASE; | 
 | 27 | 		if (UART(UART_CR) & UART_CR_EN) break; | 
 | 28 | 		return; | 
 | 29 | 	} while (0); | 
 | 30 |  | 
| Russell King | a081568 | 2006-03-28 10:24:33 +0100 | [diff] [blame] | 31 | 	/* wait for space in the UART's transmitter */ | 
 | 32 | 	while ((UART(UART_SR) & UART_SR_TxFF)) | 
 | 33 | 		barrier(); | 
 | 34 |  | 
 | 35 | 	/* send the character out. */ | 
 | 36 | 	UART(UART_DR) = c; | 
 | 37 | } | 
 | 38 |  | 
 | 39 | static inline void flush(void) | 
 | 40 | { | 
| Bellido Nicolas | 038c5b6 | 2005-06-20 18:51:05 +0100 | [diff] [blame] | 41 | } | 
 | 42 |  | 
 | 43 | #define arch_decomp_setup() | 
 | 44 | #define arch_decomp_wdog() | 
 | 45 |  | 
 | 46 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ |