aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-omap/uncompress.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-arm/arch-omap/uncompress.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-arm/arch-omap/uncompress.h')
-rw-r--r--include/asm-arm/arch-omap/uncompress.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h
new file mode 100644
index 000000000000..3e640aba8c20
--- /dev/null
+++ b/include/asm-arm/arch-omap/uncompress.h
@@ -0,0 +1,82 @@
1/*
2 * linux/include/asm-arm/arch-omap/uncompress.h
3 *
4 * Serial port stubs for kernel decompress status messages
5 *
6 * Initially based on:
7 * linux-2.4.15-rmk1-dsplinux1.6/include/asm-arm/arch-omap1510/uncompress.h
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Author: Greg Lonnon <glonnon@ridgerun.com>
10 *
11 * Rewritten by:
12 * Author: <source@mvista.com>
13 * 2004 (c) MontaVista Software, Inc.
14 *
15 * This file is licensed under the terms of the GNU General Public License
16 * version 2. This program is licensed "as is" without any warranty of any
17 * kind, whether express or implied.
18 */
19
20#include <linux/config.h>
21#include <linux/types.h>
22#include <linux/serial_reg.h>
23#include <asm/arch/hardware.h>
24
25unsigned int system_rev;
26
27#define UART_OMAP_MDR1 0x08 /* mode definition register */
28#define OMAP_ID_730 0x355F
29#define ID_MASK 0x7fff
30#define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
31#define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
32
33static void
34putstr(const char *s)
35{
36 volatile u8 * uart = 0;
37 int shift;
38
39#ifdef CONFIG_OMAP_LL_DEBUG_UART3
40 uart = (volatile u8 *)(OMAP_UART3_BASE);
41#elif CONFIG_OMAP_LL_DEBUG_UART2
42 uart = (volatile u8 *)(OMAP_UART2_BASE);
43#else
44 uart = (volatile u8 *)(OMAP_UART1_BASE);
45#endif
46
47 /* Determine which serial port to use */
48 do {
49 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
50 unsigned int omap_id = omap_get_id();
51
52 if (omap_id == OMAP_ID_730)
53 shift = 0;
54 else
55 shift = 2;
56
57 if (check_port(uart, shift))
58 break;
59 /* Silent boot if no serial ports are enabled. */
60 return;
61 } while (0);
62
63 /*
64 * Now, xmit each character
65 */
66 while (*s) {
67 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
68 barrier();
69 uart[UART_TX << shift] = *s;
70 if (*s++ == '\n') {
71 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
72 barrier();
73 uart[UART_TX << shift] = '\r';
74 }
75 }
76}
77
78/*
79 * nothing to do
80 */
81#define arch_decomp_setup()
82#define arch_decomp_wdog()