Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-arm / arch-iop3xx / uncompress.h
1 /*
2  *  linux/include/asm-arm/arch-iop3xx/uncompress.h
3  */
4 #include <linux/config.h>
5 #include <asm/types.h>
6 #include <asm/mach-types.h>
7 #include <linux/serial_reg.h>
8 #include <asm/hardware.h>
9
10 #ifdef CONFIG_ARCH_IOP321
11 #define UTYPE unsigned char *
12 #elif defined(CONFIG_ARCH_IOP331)
13 #define UTYPE u32 *
14 #else
15 #error "Missing IOP3xx arch type def"
16 #endif
17
18 static volatile UTYPE uart_base;
19
20 #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21
22 static inline void putc(char c)
23 {
24         while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
25                 barrier();
26         *uart_base = c;
27 }
28
29 static inline void flush(void)
30 {
31 }
32
33 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
34 {
35         if(machine_is_iq80321())
36                         uart_base = (volatile UTYPE)IQ80321_UART;
37                 else if(machine_is_iq31244())
38                         uart_base = (volatile UTYPE)IQ31244_UART;
39                 else if(machine_is_iq80331() || machine_is_iq80332())
40                         uart_base = (volatile UTYPE)IOP331_UART0_PHYS;
41                 else
42                         uart_base = (volatile UTYPE)0xfe800000;
43 }
44
45 /*
46  * nothing to do
47  */
48 #define arch_decomp_setup()     __arch_decomp_setup(arch_id)
49 #define arch_decomp_wdog()