blob: 070f15818fe718593c675233b471c5f231fd1d0b [file] [log] [blame]
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01001/*
Lennert Buytenhekc852ac82006-09-18 23:26:25 +01002 * include/asm-arm/arch-iop32x/uncompress.h
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01003 */
Lennert Buytenhekc852ac82006-09-18 23:26:25 +01004
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01005#include <asm/types.h>
6#include <asm/mach-types.h>
7#include <linux/serial_reg.h>
8#include <asm/hardware.h>
9
10static volatile u8 *uart_base;
11
Lennert Buytenhekc852ac82006-09-18 23:26:25 +010012#define TX_DONE (UART_LSR_TEMT | UART_LSR_THRE)
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +010013
14static inline void putc(char c)
15{
16 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17 barrier();
Lennert Buytenhekc852ac82006-09-18 23:26:25 +010018 uart_base[UART_TX] = c;
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +010019}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27 if (machine_is_iq80321())
28 uart_base = (volatile u8 *)IQ80321_UART;
Arnaud Patarda8135fc2007-07-15 20:12:23 +010029 else if (machine_is_iq31244() || machine_is_em7210())
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +010030 uart_base = (volatile u8 *)IQ31244_UART;
31 else
32 uart_base = (volatile u8 *)0xfe800000;
33}
34
35/*
36 * nothing to do
37 */
38#define arch_decomp_setup() __arch_decomp_setup(arch_id)
39#define arch_decomp_wdog()