aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-cl7500/uncompress.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm/arch-cl7500/uncompress.h')
-rw-r--r--include/asm-arm/arch-cl7500/uncompress.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/asm-arm/arch-cl7500/uncompress.h b/include/asm-arm/arch-cl7500/uncompress.h
new file mode 100644
index 000000000000..68601b3e3b95
--- /dev/null
+++ b/include/asm-arm/arch-cl7500/uncompress.h
@@ -0,0 +1,43 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/uncompress.h
3 *
4 * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
5 */
6
7#define BASE 0x03010000
8#define SERBASE (BASE + (0x2f8 << 2))
9
10static __inline__ void putc(char c)
11{
12 while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20));
13 *((volatile unsigned int *)(SERBASE)) = c;
14}
15
16/*
17 * This does not append a newline
18 */
19static void putstr(const char *s)
20{
21 while (*s) {
22 putc(*s);
23 if (*s == '\n')
24 putc('\r');
25 s++;
26 }
27}
28
29static __inline__ void arch_decomp_setup(void)
30{
31 int baud = 3686400 / (9600 * 32);
32
33 *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
34 *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
35 *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
36 *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
37 *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
38}
39
40/*
41 * nothing to do
42 */
43#define arch_decomp_wdog()