aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/serial.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
commit4f2c49fedf833e522001bc51824b894732900a3d (patch)
tree3fa99c328a2acac5752edf7c91d97c10a2b6bafa /arch/arm/plat-omap/include/plat/serial.h
parent4e6d488af37980d224cbf298224db6173673f362 (diff)
omap: Clean the serial port defines
This way we don't have conflicts with the defines with compiling in multiple omaps. Set the addresses for uarts in struct omap_globals for the early serial init code. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/serial.h')
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h45
1 files changed, 24 insertions, 21 deletions
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index f5a4a92393e..7f5a7a88a6e 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -15,37 +15,40 @@
15 15
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#if defined(CONFIG_ARCH_OMAP1)
19/* OMAP1 serial ports */ 18/* OMAP1 serial ports */
20#define OMAP_UART1_BASE 0xfffb0000 19#define OMAP1_UART1_BASE 0xfffb0000
21#define OMAP_UART2_BASE 0xfffb0800 20#define OMAP1_UART2_BASE 0xfffb0800
22#define OMAP_UART3_BASE 0xfffb9800 21#define OMAP1_UART3_BASE 0xfffb9800
23#elif defined(CONFIG_ARCH_OMAP2) 22
24/* OMAP2 serial ports */ 23/* OMAP2 serial ports */
25#define OMAP_UART1_BASE 0x4806a000 24#define OMAP2_UART1_BASE 0x4806a000
26#define OMAP_UART2_BASE 0x4806c000 25#define OMAP2_UART2_BASE 0x4806c000
27#define OMAP_UART3_BASE 0x4806e000 26#define OMAP2_UART3_BASE 0x4806e000
28#elif defined(CONFIG_ARCH_OMAP3) 27
29/* OMAP3 serial ports */ 28/* OMAP3 serial ports */
30#define OMAP_UART1_BASE 0x4806a000 29#define OMAP3_UART1_BASE 0x4806a000
31#define OMAP_UART2_BASE 0x4806c000 30#define OMAP3_UART2_BASE 0x4806c000
32#define OMAP_UART3_BASE 0x49020000 31#define OMAP3_UART3_BASE 0x49020000
33#elif defined(CONFIG_ARCH_OMAP4) 32#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
33
34/* OMAP4 serial ports */ 34/* OMAP4 serial ports */
35#define OMAP_UART1_BASE 0x4806a000 35#define OMAP4_UART1_BASE 0x4806a000
36#define OMAP_UART2_BASE 0x4806c000 36#define OMAP4_UART2_BASE 0x4806c000
37#define OMAP_UART3_BASE 0x48020000 37#define OMAP4_UART3_BASE 0x48020000
38#define OMAP_UART4_BASE 0x4806e000 38#define OMAP4_UART4_BASE 0x4806e000
39#endif 39
40#define OMAP_PORT_SHIFT 2
41#define OMAP7XX_PORT_SHIFT 0
40 42
41#define OMAP1510_BASE_BAUD (12000000/16) 43#define OMAP1510_BASE_BAUD (12000000/16)
42#define OMAP16XX_BASE_BAUD (48000000/16) 44#define OMAP16XX_BASE_BAUD (48000000/16)
43#define OMAP24XX_BASE_BAUD (48000000/16) 45#define OMAP24XX_BASE_BAUD (48000000/16)
44 46
47/* This is only used by 8250.c for omap1510 */
45#define is_omap_port(pt) ({int __ret = 0; \ 48#define is_omap_port(pt) ({int __ret = 0; \
46 if ((pt)->port.mapbase == OMAP_UART1_BASE || \ 49 if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
47 (pt)->port.mapbase == OMAP_UART2_BASE || \ 50 (pt)->port.mapbase == OMAP1_UART2_BASE || \
48 (pt)->port.mapbase == OMAP_UART3_BASE) \ 51 (pt)->port.mapbase == OMAP1_UART3_BASE) \
49 __ret = 1; \ 52 __ret = 1; \
50 __ret; \ 53 __ret; \
51 }) 54 })