ia64/linux-2.6.18-xen.hg

view include/asm-arm/arch-iop3xx/uncompress.h @ 782:9ab1c319531f

merge with linux-2.6.18-xen.hg
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jan 28 13:07:23 2009 +0900 (2009-01-28)
parents 831230e53067
children
line source
1 /*
2 * linux/include/asm-arm/arch-iop3xx/uncompress.h
3 */
4 #include <asm/types.h>
5 #include <asm/mach-types.h>
6 #include <linux/serial_reg.h>
7 #include <asm/hardware.h>
9 #ifdef CONFIG_ARCH_IOP321
10 #define UTYPE unsigned char *
11 #elif defined(CONFIG_ARCH_IOP331)
12 #define UTYPE u32 *
13 #else
14 #error "Missing IOP3xx arch type def"
15 #endif
17 static volatile UTYPE uart_base;
19 #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21 static inline void putc(char c)
22 {
23 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
24 barrier();
25 *uart_base = c;
26 }
28 static inline void flush(void)
29 {
30 }
32 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
33 {
34 if(machine_is_iq80321())
35 uart_base = (volatile UTYPE)IQ80321_UART;
36 else if(machine_is_iq31244())
37 uart_base = (volatile UTYPE)IQ31244_UART;
38 else if(machine_is_iq80331() || machine_is_iq80332())
39 uart_base = (volatile UTYPE)IOP331_UART0_PHYS;
40 else
41 uart_base = (volatile UTYPE)0xfe800000;
42 }
44 /*
45 * nothing to do
46 */
47 #define arch_decomp_setup() __arch_decomp_setup(arch_id)
48 #define arch_decomp_wdog()