aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h123
-rw-r--r--arch/arm/plat-omap/include/plat/uncompress.h204
2 files changed, 0 insertions, 327 deletions
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
deleted file mode 100644
index b780470d03ea..000000000000
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * arch/arm/plat-omap/include/mach/serial.h
3 *
4 * Copyright (C) 2009 Texas Instruments
5 * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ASM_ARCH_SERIAL_H
14#define __ASM_ARCH_SERIAL_H
15
16#include <linux/init.h>
17
18/*
19 * Memory entry used for the DEBUG_LL UART configuration, relative to
20 * start of RAM. See also uncompress.h and debug-macro.S.
21 *
22 * Note that using a memory location for storing the UART configuration
23 * has at least two limitations:
24 *
25 * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
26 * uncompress code could then partially overwrite itself
27 * 2. We assume printascii is called at least once before paging_init,
28 * and addruart has a chance to read OMAP_UART_INFO
29 */
30#define OMAP_UART_INFO_OFS 0x3ffc
31
32/* OMAP1 serial ports */
33#define OMAP1_UART1_BASE 0xfffb0000
34#define OMAP1_UART2_BASE 0xfffb0800
35#define OMAP1_UART3_BASE 0xfffb9800
36
37/* OMAP2 serial ports */
38#define OMAP2_UART1_BASE 0x4806a000
39#define OMAP2_UART2_BASE 0x4806c000
40#define OMAP2_UART3_BASE 0x4806e000
41
42/* OMAP3 serial ports */
43#define OMAP3_UART1_BASE OMAP2_UART1_BASE
44#define OMAP3_UART2_BASE OMAP2_UART2_BASE
45#define OMAP3_UART3_BASE 0x49020000
46#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
47#define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */
48
49/* OMAP4 serial ports */
50#define OMAP4_UART1_BASE OMAP2_UART1_BASE
51#define OMAP4_UART2_BASE OMAP2_UART2_BASE
52#define OMAP4_UART3_BASE 0x48020000
53#define OMAP4_UART4_BASE 0x4806e000
54
55/* TI81XX serial ports */
56#define TI81XX_UART1_BASE 0x48020000
57#define TI81XX_UART2_BASE 0x48022000
58#define TI81XX_UART3_BASE 0x48024000
59
60/* AM3505/3517 UART4 */
61#define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
62
63/* AM33XX serial port */
64#define AM33XX_UART1_BASE 0x44E09000
65
66/* OMAP5 serial ports */
67#define OMAP5_UART1_BASE OMAP2_UART1_BASE
68#define OMAP5_UART2_BASE OMAP2_UART2_BASE
69#define OMAP5_UART3_BASE OMAP4_UART3_BASE
70#define OMAP5_UART4_BASE OMAP4_UART4_BASE
71#define OMAP5_UART5_BASE 0x48066000
72#define OMAP5_UART6_BASE 0x48068000
73
74/* External port on Zoom2/3 */
75#define ZOOM_UART_BASE 0x10000000
76#define ZOOM_UART_VIRT 0xfa400000
77
78#define OMAP_PORT_SHIFT 2
79#define OMAP7XX_PORT_SHIFT 0
80#define ZOOM_PORT_SHIFT 1
81
82#define OMAP1510_BASE_BAUD (12000000/16)
83#define OMAP16XX_BASE_BAUD (48000000/16)
84#define OMAP24XX_BASE_BAUD (48000000/16)
85
86/*
87 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
88 * decomp_setup in uncompress.h
89 */
90#define OMAP1UART1 11
91#define OMAP1UART2 12
92#define OMAP1UART3 13
93#define OMAP2UART1 21
94#define OMAP2UART2 22
95#define OMAP2UART3 23
96#define OMAP3UART1 OMAP2UART1
97#define OMAP3UART2 OMAP2UART2
98#define OMAP3UART3 33
99#define OMAP3UART4 34 /* Only on 36xx */
100#define OMAP4UART1 OMAP2UART1
101#define OMAP4UART2 OMAP2UART2
102#define OMAP4UART3 43
103#define OMAP4UART4 44
104#define TI81XXUART1 81
105#define TI81XXUART2 82
106#define TI81XXUART3 83
107#define AM33XXUART1 84
108#define OMAP5UART3 OMAP4UART3
109#define OMAP5UART4 OMAP4UART4
110#define ZOOM_UART 95 /* Only on zoom2/3 */
111
112#ifndef __ASSEMBLER__
113
114struct omap_board_data;
115struct omap_uart_port_info;
116
117extern void omap_serial_init(void);
118extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
119extern void omap_serial_init_port(struct omap_board_data *bdata,
120 struct omap_uart_port_info *platform_data);
121#endif
122
123#endif
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
deleted file mode 100644
index 7f7b112acccb..000000000000
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ /dev/null
@@ -1,204 +0,0 @@
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
23#include <asm/memory.h>
24#include <asm/mach-types.h>
25
26#include <plat/serial.h>
27
28#define MDR1_MODE_MASK 0x07
29
30volatile u8 *uart_base;
31int uart_shift;
32
33/*
34 * Store the DEBUG_LL uart number into memory.
35 * See also debug-macro.S, and serial.c for related code.
36 */
37static void set_omap_uart_info(unsigned char port)
38{
39 /*
40 * Get address of some.bss variable and round it down
41 * a la CONFIG_AUTO_ZRELADDR.
42 */
43 u32 ram_start = (u32)&uart_shift & 0xf8000000;
44 u32 *uart_info = (u32 *)(ram_start + OMAP_UART_INFO_OFS);
45 *uart_info = port;
46}
47
48static void putc(int c)
49{
50 if (!uart_base)
51 return;
52
53 /* Check for UART 16x mode */
54 if ((uart_base[UART_OMAP_MDR1 << uart_shift] & MDR1_MODE_MASK) != 0)
55 return;
56
57 while (!(uart_base[UART_LSR << uart_shift] & UART_LSR_THRE))
58 barrier();
59 uart_base[UART_TX << uart_shift] = c;
60}
61
62static inline void flush(void)
63{
64}
65
66/*
67 * Macros to configure UART1 and debug UART
68 */
69#define _DEBUG_LL_ENTRY(mach, dbg_uart, dbg_shft, dbg_id) \
70 if (machine_is_##mach()) { \
71 uart_base = (volatile u8 *)(dbg_uart); \
72 uart_shift = (dbg_shft); \
73 port = (dbg_id); \
74 set_omap_uart_info(port); \
75 break; \
76 }
77
78#define DEBUG_LL_OMAP7XX(p, mach) \
79 _DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP7XX_PORT_SHIFT, \
80 OMAP1UART##p)
81
82#define DEBUG_LL_OMAP1(p, mach) \
83 _DEBUG_LL_ENTRY(mach, OMAP1_UART##p##_BASE, OMAP_PORT_SHIFT, \
84 OMAP1UART##p)
85
86#define DEBUG_LL_OMAP2(p, mach) \
87 _DEBUG_LL_ENTRY(mach, OMAP2_UART##p##_BASE, OMAP_PORT_SHIFT, \
88 OMAP2UART##p)
89
90#define DEBUG_LL_OMAP3(p, mach) \
91 _DEBUG_LL_ENTRY(mach, OMAP3_UART##p##_BASE, OMAP_PORT_SHIFT, \
92 OMAP3UART##p)
93
94#define DEBUG_LL_OMAP4(p, mach) \
95 _DEBUG_LL_ENTRY(mach, OMAP4_UART##p##_BASE, OMAP_PORT_SHIFT, \
96 OMAP4UART##p)
97
98#define DEBUG_LL_OMAP5(p, mach) \
99 _DEBUG_LL_ENTRY(mach, OMAP5_UART##p##_BASE, OMAP_PORT_SHIFT, \
100 OMAP5UART##p)
101/* Zoom2/3 shift is different for UART1 and external port */
102#define DEBUG_LL_ZOOM(mach) \
103 _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART)
104
105#define DEBUG_LL_TI81XX(p, mach) \
106 _DEBUG_LL_ENTRY(mach, TI81XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
107 TI81XXUART##p)
108
109#define DEBUG_LL_AM33XX(p, mach) \
110 _DEBUG_LL_ENTRY(mach, AM33XX_UART##p##_BASE, OMAP_PORT_SHIFT, \
111 AM33XXUART##p)
112
113static inline void arch_decomp_setup(void)
114{
115 int port = 0;
116
117 /*
118 * Initialize the port based on the machine ID from the bootloader.
119 * Note that we're using macros here instead of switch statement
120 * as machine_is functions are optimized out for the boards that
121 * are not selected.
122 */
123 do {
124 /* omap7xx/8xx based boards using UART1 with shift 0 */
125 DEBUG_LL_OMAP7XX(1, herald);
126 DEBUG_LL_OMAP7XX(1, omap_perseus2);
127
128 /* omap15xx/16xx based boards using UART1 */
129 DEBUG_LL_OMAP1(1, ams_delta);
130 DEBUG_LL_OMAP1(1, nokia770);
131 DEBUG_LL_OMAP1(1, omap_h2);
132 DEBUG_LL_OMAP1(1, omap_h3);
133 DEBUG_LL_OMAP1(1, omap_innovator);
134 DEBUG_LL_OMAP1(1, omap_osk);
135 DEBUG_LL_OMAP1(1, omap_palmte);
136 DEBUG_LL_OMAP1(1, omap_palmz71);
137
138 /* omap15xx/16xx based boards using UART2 */
139 DEBUG_LL_OMAP1(2, omap_palmtt);
140
141 /* omap15xx/16xx based boards using UART3 */
142 DEBUG_LL_OMAP1(3, sx1);
143
144 /* omap2 based boards using UART1 */
145 DEBUG_LL_OMAP2(1, omap_2430sdp);
146 DEBUG_LL_OMAP2(1, omap_apollon);
147 DEBUG_LL_OMAP2(1, omap_h4);
148
149 /* omap2 based boards using UART3 */
150 DEBUG_LL_OMAP2(3, nokia_n800);
151 DEBUG_LL_OMAP2(3, nokia_n810);
152 DEBUG_LL_OMAP2(3, nokia_n810_wimax);
153
154 /* omap3 based boards using UART1 */
155 DEBUG_LL_OMAP2(1, omap3evm);
156 DEBUG_LL_OMAP3(1, omap_3430sdp);
157 DEBUG_LL_OMAP3(1, omap_3630sdp);
158 DEBUG_LL_OMAP3(1, omap3530_lv_som);
159 DEBUG_LL_OMAP3(1, omap3_torpedo);
160
161 /* omap3 based boards using UART3 */
162 DEBUG_LL_OMAP3(3, cm_t35);
163 DEBUG_LL_OMAP3(3, cm_t3517);
164 DEBUG_LL_OMAP3(3, cm_t3730);
165 DEBUG_LL_OMAP3(3, craneboard);
166 DEBUG_LL_OMAP3(3, devkit8000);
167 DEBUG_LL_OMAP3(3, igep0020);
168 DEBUG_LL_OMAP3(3, igep0030);
169 DEBUG_LL_OMAP3(3, nokia_rm680);
170 DEBUG_LL_OMAP3(3, nokia_rm696);
171 DEBUG_LL_OMAP3(3, nokia_rx51);
172 DEBUG_LL_OMAP3(3, omap3517evm);
173 DEBUG_LL_OMAP3(3, omap3_beagle);
174 DEBUG_LL_OMAP3(3, omap3_pandora);
175 DEBUG_LL_OMAP3(3, omap_ldp);
176 DEBUG_LL_OMAP3(3, overo);
177 DEBUG_LL_OMAP3(3, touchbook);
178
179 /* omap4 based boards using UART3 */
180 DEBUG_LL_OMAP4(3, omap_4430sdp);
181 DEBUG_LL_OMAP4(3, omap4_panda);
182
183 /* omap5 based boards using UART3 */
184 DEBUG_LL_OMAP5(3, omap5_sevm);
185
186 /* zoom2/3 external uart */
187 DEBUG_LL_ZOOM(omap_zoom2);
188 DEBUG_LL_ZOOM(omap_zoom3);
189
190 /* TI8168 base boards using UART3 */
191 DEBUG_LL_TI81XX(3, ti8168evm);
192
193 /* TI8148 base boards using UART1 */
194 DEBUG_LL_TI81XX(1, ti8148evm);
195
196 /* AM33XX base boards using UART1 */
197 DEBUG_LL_AM33XX(1, am335xevm);
198 } while (0);
199}
200
201/*
202 * nothing to do
203 */
204#define arch_decomp_wdog()