aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-iop3xx/uncompress.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-iop3xx/uncompress.h')
-rw-r--r--include/asm-arm/arch-iop3xx/uncompress.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h
new file mode 100644
index 000000000000..82b88762c3cc
--- /dev/null
+++ b/include/asm-arm/arch-iop3xx/uncompress.h
@@ -0,0 +1,57 @@
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
18static volatile UTYPE uart_base;
19
20#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
21
22static __inline__ void putc(char c)
23{
24 while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE);
25 *uart_base = c;
26}
27
28/*
29 * This does not append a newline
30 */
31static void putstr(const char *s)
32{
33 while (*s) {
34 putc(*s);
35 if (*s == '\n')
36 putc('\r');
37 s++;
38 }
39}
40
41static __inline__ void __arch_decomp_setup(unsigned long arch_id)
42{
43 if(machine_is_iq80321())
44 uart_base = (volatile UTYPE)IQ80321_UART;
45 else if(machine_is_iq31244())
46 uart_base = (volatile UTYPE)IQ31244_UART;
47 else if(machine_is_iq80331() || machine_is_iq80332())
48 uart_base = (volatile UTYPE)IOP331_UART0_PHYS;
49 else
50 uart_base = (volatile UTYPE)0xfe800000;
51}
52
53/*
54 * nothing to do
55 */
56#define arch_decomp_setup() __arch_decomp_setup(arch_id)
57#define arch_decomp_wdog()