This source file includes following definitions.
- putc
- flush
- __arch_decomp_setup
1
2
3
4
5
6
7
8
9 #ifndef _ARCH_UNCOMPRESS_H_
10 #define _ARCH_UNCOMPRESS_H_
11
12 #include "ixp4xx-regs.h"
13 #include <asm/mach-types.h>
14 #include <linux/serial_reg.h>
15
16 #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
17
18 volatile u32* uart_base;
19
20 static inline void putc(int c)
21 {
22
23
24 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
25 barrier();
26
27 *uart_base = c;
28 }
29
30 static void flush(void)
31 {
32 }
33
34 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
35 {
36
37
38
39 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
40 machine_is_gateway7001() || machine_is_wg302v2() ||
41 machine_is_devixp() || machine_is_miccpt() || machine_is_mic256())
42 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
43 else
44 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
45 }
46
47
48
49
50 #define arch_decomp_setup() __arch_decomp_setup(arch_id)
51
52 #endif