acpiphp: Execute ACPI _REG method for hotadded devices
[linux/fpc-iii.git] / arch / arm / plat-omap / include / plat / uncompress.h
blob13c305d621273dba594f5c9e0830492a5c90de60
1 /*
2 * arch/arm/plat-omap/include/mach/uncompress.h
4 * Serial port stubs for kernel decompress status messages
6 * Initially based on:
7 * linux-2.4.15-rmk1-dsplinux1.6/arch/arm/plat-omap/include/mach1510/uncompress.h
8 * Copyright (C) 2000 RidgeRun, Inc.
9 * Author: Greg Lonnon <glonnon@ridgerun.com>
11 * Rewritten by:
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/types.h>
21 #include <linux/serial_reg.h>
22 #include <plat/serial.h>
24 unsigned int system_rev;
26 #define UART_OMAP_MDR1 0x08 /* mode definition register */
27 #define OMAP_ID_730 0x355F
28 #define OMAP_ID_850 0x362C
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
33 static void putc(int c)
35 volatile u8 * uart = 0;
36 int shift = 2;
38 #ifdef CONFIG_MACH_OMAP_PALMTE
39 return;
40 #endif
42 #ifdef CONFIG_ARCH_OMAP
43 #ifdef CONFIG_OMAP_LL_DEBUG_UART3
44 uart = (volatile u8 *)(OMAP_UART3_BASE);
45 #elif defined(CONFIG_OMAP_LL_DEBUG_UART2)
46 uart = (volatile u8 *)(OMAP_UART2_BASE);
47 #elif defined(CONFIG_OMAP_LL_DEBUG_UART1)
48 uart = (volatile u8 *)(OMAP_UART1_BASE);
49 #elif defined(CONFIG_OMAP_LL_DEBUG_NONE)
50 return;
51 #else
52 return;
53 #endif
55 #ifdef CONFIG_ARCH_OMAP1
56 /* Determine which serial port to use */
57 do {
58 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
59 unsigned int omap_id = omap_get_id();
61 if (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850)
62 shift = 0;
64 if (check_port(uart, shift))
65 break;
66 /* Silent boot if no serial ports are enabled. */
67 return;
68 } while (0);
69 #endif /* CONFIG_ARCH_OMAP1 */
70 #endif
73 * Now, xmit each character
75 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
76 barrier();
77 uart[UART_TX << shift] = c;
80 static inline void flush(void)
85 * nothing to do
87 #define arch_decomp_setup()
88 #define arch_decomp_wdog()