2 * linux/include/asm-arm/arch-omap/uncompress.h
4 * Serial port stubs for kernel decompress status messages
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>
12 * Author: <source@mvista.com>
13 * 2004 (c) MontaVista Software, Inc.
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.
20 #include <linux/config.h>
21 #include <linux/types.h>
22 #include <linux/serial_reg.h>
23 #include <asm/hardware.h>
24 #include <asm/arch/serial.h>
26 #define UART_OMAP_MDR1 0x08 /* mode definition register */
27 #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0)
28 #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK
33 volatile u8
* uart
= 0;
36 #ifdef CONFIG_OMAP_LL_DEBUG_UART3
37 uart
= (volatile u8
*)(OMAP_UART3_BASE
);
38 #elif CONFIG_OMAP_LL_DEBUG_UART2
39 uart
= (volatile u8
*)(OMAP_UART2_BASE
);
41 uart
= (volatile u8
*)(OMAP_UART1_BASE
);
44 /* Determine which serial port to use */
46 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
47 unsigned int omap_id
= omap_get_id();
49 if (omap_id
== OMAP_ID_1510
|| omap_id
== OMAP_ID_1610
||
50 omap_id
== OMAP_ID_1710
|| omap_id
== OMAP_ID_5912
) {
52 } else if (omap_id
== OMAP_ID_730
) {
55 /* Assume nothing for unknown OMAP processors.
56 * Add an entry for your OMAP type to select
57 * the default serial console here. If the
58 * serial port is enabled, we'll use it to
59 * display status messages. Else we'll be
64 if (check_port(uart
, shift
))
66 /* Silent boot if no serial ports are enabled. */
71 * Now, xmit each character
74 while (!(uart
[UART_LSR
<< shift
] & UART_LSR_THRE
))
76 uart
[UART_TX
<< shift
] = *s
;
78 while (!(uart
[UART_LSR
<< shift
] & UART_LSR_THRE
))
80 uart
[UART_TX
<< shift
] = '\r';
88 #define arch_decomp_setup()
89 #define arch_decomp_wdog()