aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/uncompress.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2009-10-19 20:32:58 -0400
committerTony Lindgren <tony@atomide.com>2009-10-19 20:32:58 -0400
commit3eff851b9dc1e84aa0822772e0be9afb0c973585 (patch)
tree7c9e7b28e65e8c74c2cc6601f0ff4e5f49e6a8c2 /arch/arm/plat-omap/include/plat/uncompress.h
parent1e79ab8a45b71d3d08eb6cdac44b66229dcea03e (diff)
omap: headers: Create headers necessary for compile under mach-omap1 and mach-omap2
Create the headers needed for compiling under mach-omap1/include/mach and mach-omap2/include/mach. This was done with the following script: #!/bin/bash mach_files="clkdev.h gpio.h hardware.h io.h irqs.h memory.h \ smp.h system.h timex.h uncompress.h vmalloc.h" omaps="mach-omap1 mach-omap2" mach_dir_old="arch/arm/plat-omap/include/mach" plat_dir_new="arch/arm/plat-omap/include/plat" mkdir -p $plat_dir_new git add $plat_dir_new for dir in $omaps; do mach_dir_new="arch/arm/$dir/include/mach" for header in $mach_files; do file="$mach_dir_new/$header" if [ ! -f $file ]; then echo -ne "/*\n * $file\n */\n\n#include <plat/$header>\n" > $file git add $file if [ ! -f $plat_dir_new/$header ]; then git mv $mach_dir_old/$header $plat_dir_new/$header fi fi done done Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/uncompress.h')
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
new file mode 100644
index 000000000000..ddf7b88dec4d
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -0,0 +1,84 @@
1/*
2 * arch/arm/plat-omap/include/mach/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/arch/arm/plat-omap/include/mach1510/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/types.h>
21#include <linux/serial_reg.h>
22#include <mach/serial.h>
23
24unsigned int system_rev;
25
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
32
33static void putc(int c)
34{
35 volatile u8 * uart = 0;
36 int shift = 2;
37
38#ifdef CONFIG_MACH_OMAP_PALMTE
39 return;
40#endif
41
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#else
48 uart = (volatile u8 *)(OMAP_UART1_BASE);
49#endif
50
51#ifdef CONFIG_ARCH_OMAP1
52 /* Determine which serial port to use */
53 do {
54 /* MMU is not on, so cpu_is_omapXXXX() won't work here */
55 unsigned int omap_id = omap_get_id();
56
57 if (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850)
58 shift = 0;
59
60 if (check_port(uart, shift))
61 break;
62 /* Silent boot if no serial ports are enabled. */
63 return;
64 } while (0);
65#endif /* CONFIG_ARCH_OMAP1 */
66#endif
67
68 /*
69 * Now, xmit each character
70 */
71 while (!(uart[UART_LSR << shift] & UART_LSR_THRE))
72 barrier();
73 uart[UART_TX << shift] = c;
74}
75
76static inline void flush(void)
77{
78}
79
80/*
81 * nothing to do
82 */
83#define arch_decomp_setup()
84#define arch_decomp_wdog()