blob: 34d9e8e8287ae0c88ba28ffb757ab38c57156460 [file] [log] [blame]
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01001/*
Lennert Buytenhekc852ac82006-09-18 23:26:25 +01002 * include/asm-arm/arch-iop33x/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>
Russell Kingbe509722008-08-04 10:41:28 +01008#include <asm/arch/hardware.h>
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +01009
10static volatile u32 *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_iq80331() || machine_is_iq80332())
Lennert Buytenhekc852ac82006-09-18 23:26:25 +010028 uart_base = (volatile u32 *)IOP33X_UART0_PHYS;
Lennert Buytenhek3f7e5812006-09-18 23:10:26 +010029 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()