Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 1 | /* |
Lennert Buytenhek | c852ac8 | 2006-09-18 23:26:25 +0100 | [diff] [blame^] | 2 | * include/asm-arm/arch-iop33x/uncompress.h |
Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 3 | */ |
Lennert Buytenhek | c852ac8 | 2006-09-18 23:26:25 +0100 | [diff] [blame^] | 4 | |
Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 5 | #include <asm/types.h> |
| 6 | #include <asm/mach-types.h> |
| 7 | #include <linux/serial_reg.h> |
| 8 | #include <asm/hardware.h> |
| 9 | |
| 10 | static volatile u32 *uart_base; |
| 11 | |
Lennert Buytenhek | c852ac8 | 2006-09-18 23:26:25 +0100 | [diff] [blame^] | 12 | #define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE) |
Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 13 | |
| 14 | static inline void putc(char c) |
| 15 | { |
| 16 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) |
| 17 | barrier(); |
Lennert Buytenhek | c852ac8 | 2006-09-18 23:26:25 +0100 | [diff] [blame^] | 18 | uart_base[UART_TX] = c; |
Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 19 | } |
| 20 | |
| 21 | static inline void flush(void) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) |
| 26 | { |
| 27 | if (machine_is_iq80331() || machine_is_iq80332()) |
Lennert Buytenhek | c852ac8 | 2006-09-18 23:26:25 +0100 | [diff] [blame^] | 28 | uart_base = (volatile u32 *)IOP33X_UART0_PHYS; |
Lennert Buytenhek | 3f7e581 | 2006-09-18 23:10:26 +0100 | [diff] [blame] | 29 | else |
| 30 | uart_base = (volatile u32 *)0xfe800000; |
| 31 | } |
| 32 | |
| 33 | /* |
| 34 | * nothing to do |
| 35 | */ |
| 36 | #define arch_decomp_setup() __arch_decomp_setup(arch_id) |
| 37 | #define arch_decomp_wdog() |