]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/plat-omap/include/plat/serial.h
omap: Make uncompress code and DEBUG_LL code generic
[net-next-2.6.git] / arch / arm / plat-omap / include / plat / serial.h
CommitLineData
9839c6b8 1/*
44169075
SS
2 * arch/arm/plat-omap/include/mach/serial.h
3 *
4 * Copyright (C) 2009 Texas Instruments
5 * Addded OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
9839c6b8
TL
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
b3c6df3a
PW
16#include <linux/init.h>
17
9839c6b8 18/* OMAP1 serial ports */
4f2c49fe
TL
19#define OMAP1_UART1_BASE 0xfffb0000
20#define OMAP1_UART2_BASE 0xfffb0800
21#define OMAP1_UART3_BASE 0xfffb9800
22
9839c6b8 23/* OMAP2 serial ports */
4f2c49fe
TL
24#define OMAP2_UART1_BASE 0x4806a000
25#define OMAP2_UART2_BASE 0x4806c000
26#define OMAP2_UART3_BASE 0x4806e000
27
6e81176d 28/* OMAP3 serial ports */
0c8219f0
TL
29#define OMAP3_UART1_BASE OMAP2_UART1_BASE
30#define OMAP3_UART2_BASE OMAP2_UART2_BASE
4f2c49fe
TL
31#define OMAP3_UART3_BASE 0x49020000
32#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
33
44169075 34/* OMAP4 serial ports */
0c8219f0
TL
35#define OMAP4_UART1_BASE OMAP2_UART1_BASE
36#define OMAP4_UART2_BASE OMAP2_UART2_BASE
4f2c49fe
TL
37#define OMAP4_UART3_BASE 0x48020000
38#define OMAP4_UART4_BASE 0x4806e000
39
0c8219f0
TL
40/* External port on Zoom2/3 */
41#define ZOOM_UART_BASE 0x10000000
42#define ZOOM_UART_VIRT 0xfb000000
43
4f2c49fe
TL
44#define OMAP_PORT_SHIFT 2
45#define OMAP7XX_PORT_SHIFT 0
0c8219f0 46#define ZOOM_PORT_SHIFT 1
9839c6b8 47
9839c6b8
TL
48#define OMAP1510_BASE_BAUD (12000000/16)
49#define OMAP16XX_BASE_BAUD (48000000/16)
6e81176d 50#define OMAP24XX_BASE_BAUD (48000000/16)
9839c6b8 51
0c8219f0
TL
52/*
53 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
54 * decomp_setup in uncompress.h
55 */
56#define OMAP1UART1 11
57#define OMAP1UART2 12
58#define OMAP1UART3 13
59#define OMAP2UART1 21
60#define OMAP2UART2 22
61#define OMAP2UART3 23
62#define OMAP3UART1 OMAP2UART1
63#define OMAP3UART2 OMAP2UART2
64#define OMAP3UART3 33
65#define OMAP3UART4 34 /* Only on 36xx */
66#define OMAP4UART1 OMAP2UART1
67#define OMAP4UART2 OMAP2UART2
68#define OMAP4UART3 43
69#define OMAP4UART4 44
70#define ZOOM_UART 95 /* Only on zoom2/3 */
71
4f2c49fe 72/* This is only used by 8250.c for omap1510 */
5668545a 73#define is_omap_port(pt) ({int __ret = 0; \
4f2c49fe
TL
74 if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
75 (pt)->port.mapbase == OMAP1_UART2_BASE || \
76 (pt)->port.mapbase == OMAP1_UART3_BASE) \
5668545a
RK
77 __ret = 1; \
78 __ret; \
9839c6b8
TL
79 })
80
4af4016c 81#ifndef __ASSEMBLER__
b3c6df3a 82extern void __init omap_serial_early_init(void);
4af4016c 83extern void omap_serial_init(void);
f62349ee 84extern void omap_serial_init_port(int port);
4af4016c
KH
85extern int omap_uart_can_sleep(void);
86extern void omap_uart_check_wakeup(void);
87extern void omap_uart_prepare_suspend(void);
88extern void omap_uart_prepare_idle(int num);
89extern void omap_uart_resume_idle(int num);
2466211e 90extern void omap_uart_enable_irqs(int enable);
4af4016c
KH
91#endif
92
9839c6b8 93#endif