blob: 9951345a25d6ae1b17d901d461af6156393f33d1 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/*
Santosh Shilimkar44169072009-05-28 14:16:04 -07002 * 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>
Russell Kinga09e64f2008-08-05 16:14:15 +01006 *
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
Paul Walmsleyb3c6df32009-09-03 20:14:02 +030016#include <linux/init.h>
17
Russell Kinga09e64f2008-08-05 16:14:15 +010018#if defined(CONFIG_ARCH_OMAP1)
19/* OMAP1 serial ports */
20#define OMAP_UART1_BASE 0xfffb0000
21#define OMAP_UART2_BASE 0xfffb0800
22#define OMAP_UART3_BASE 0xfffb9800
23#elif defined(CONFIG_ARCH_OMAP2)
24/* OMAP2 serial ports */
25#define OMAP_UART1_BASE 0x4806a000
26#define OMAP_UART2_BASE 0x4806c000
27#define OMAP_UART3_BASE 0x4806e000
Jouni Hogander6e811762008-10-06 15:49:15 +030028#elif defined(CONFIG_ARCH_OMAP3)
29/* OMAP3 serial ports */
30#define OMAP_UART1_BASE 0x4806a000
31#define OMAP_UART2_BASE 0x4806c000
32#define OMAP_UART3_BASE 0x49020000
Santosh Shilimkar44169072009-05-28 14:16:04 -070033#elif defined(CONFIG_ARCH_OMAP4)
34/* OMAP4 serial ports */
35#define OMAP_UART1_BASE 0x4806a000
36#define OMAP_UART2_BASE 0x4806c000
37#define OMAP_UART3_BASE 0x48020000
38#define OMAP_UART4_BASE 0x4806e000
Russell Kinga09e64f2008-08-05 16:14:15 +010039#endif
40
Russell Kinga09e64f2008-08-05 16:14:15 +010041#define OMAP1510_BASE_BAUD (12000000/16)
42#define OMAP16XX_BASE_BAUD (48000000/16)
Jouni Hogander6e811762008-10-06 15:49:15 +030043#define OMAP24XX_BASE_BAUD (48000000/16)
Russell Kinga09e64f2008-08-05 16:14:15 +010044
Russell King56685452008-09-01 21:25:33 +010045#define is_omap_port(pt) ({int __ret = 0; \
46 if ((pt)->port.mapbase == OMAP_UART1_BASE || \
47 (pt)->port.mapbase == OMAP_UART2_BASE || \
48 (pt)->port.mapbase == OMAP_UART3_BASE) \
49 __ret = 1; \
50 __ret; \
Russell Kinga09e64f2008-08-05 16:14:15 +010051 })
52
Kevin Hilman4af40162009-02-04 10:51:40 -080053#ifndef __ASSEMBLER__
Paul Walmsleyb3c6df32009-09-03 20:14:02 +030054extern void __init omap_serial_early_init(void);
Kevin Hilman4af40162009-02-04 10:51:40 -080055extern void omap_serial_init(void);
56extern int omap_uart_can_sleep(void);
57extern void omap_uart_check_wakeup(void);
58extern void omap_uart_prepare_suspend(void);
59extern void omap_uart_prepare_idle(int num);
60extern void omap_uart_resume_idle(int num);
Tero Kristo24662112009-03-05 16:32:23 +020061extern void omap_uart_enable_irqs(int enable);
Kevin Hilman4af40162009-02-04 10:51:40 -080062#endif
63
Russell Kinga09e64f2008-08-05 16:14:15 +010064#endif