2 * arch/arm/plat-omap/include/mach/serial.h
4 * Copyright (C) 2009 Texas Instruments
5 * Addded OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
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.
13 #ifndef __ASM_ARCH_SERIAL_H
14 #define __ASM_ARCH_SERIAL_H
16 #include <linux/init.h>
18 /* OMAP1 serial ports */
19 #define OMAP1_UART1_BASE 0xfffb0000
20 #define OMAP1_UART2_BASE 0xfffb0800
21 #define OMAP1_UART3_BASE 0xfffb9800
23 /* OMAP2 serial ports */
24 #define OMAP2_UART1_BASE 0x4806a000
25 #define OMAP2_UART2_BASE 0x4806c000
26 #define OMAP2_UART3_BASE 0x4806e000
28 /* OMAP3 serial ports */
29 #define OMAP3_UART1_BASE OMAP2_UART1_BASE
30 #define OMAP3_UART2_BASE OMAP2_UART2_BASE
31 #define OMAP3_UART3_BASE 0x49020000
32 #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
34 /* OMAP4 serial ports */
35 #define OMAP4_UART1_BASE OMAP2_UART1_BASE
36 #define OMAP4_UART2_BASE OMAP2_UART2_BASE
37 #define OMAP4_UART3_BASE 0x48020000
38 #define OMAP4_UART4_BASE 0x4806e000
40 /* External port on Zoom2/3 */
41 #define ZOOM_UART_BASE 0x10000000
42 #define ZOOM_UART_VIRT 0xfb000000
44 #define OMAP_PORT_SHIFT 2
45 #define OMAP7XX_PORT_SHIFT 0
46 #define ZOOM_PORT_SHIFT 1
48 #define OMAP1510_BASE_BAUD (12000000/16)
49 #define OMAP16XX_BASE_BAUD (48000000/16)
50 #define OMAP24XX_BASE_BAUD (48000000/16)
53 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
54 * decomp_setup in uncompress.h
62 #define OMAP3UART1 OMAP2UART1
63 #define OMAP3UART2 OMAP2UART2
65 #define OMAP3UART4 34 /* Only on 36xx */
66 #define OMAP4UART1 OMAP2UART1
67 #define OMAP4UART2 OMAP2UART2
70 #define ZOOM_UART 95 /* Only on zoom2/3 */
72 /* This is only used by 8250.c for omap1510 */
73 #define is_omap_port(pt) ({int __ret = 0; \
74 if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
75 (pt)->port.mapbase == OMAP1_UART2_BASE || \
76 (pt)->port.mapbase == OMAP1_UART3_BASE) \
82 extern void __init
omap_serial_early_init(void);
83 extern void omap_serial_init(void);
84 extern void omap_serial_init_port(int port
);
85 extern int omap_uart_can_sleep(void);
86 extern void omap_uart_check_wakeup(void);
87 extern void omap_uart_prepare_suspend(void);
88 extern void omap_uart_prepare_idle(int num
);
89 extern void omap_uart_resume_idle(int num
);
90 extern void omap_uart_enable_irqs(int enable
);