aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-10-15 15:50:46 -0400
committerTony Lindgren <tony@atomide.com>2012-10-24 16:34:31 -0400
commit3d82cbbb3aadb4f8a30e3f614e51be96574a0855 (patch)
tree6f510bda0fb3c08d959100928ca2fb783c61739a
parentede8df1eaa19f96ee8520077885856eb63acb44b (diff)
ARM: OMAP: Split plat/serial.h for omap1 and omap2+
For omap1, we'll keep mach/serial.h around for 8250.c hardware workarounds. For omap2+, we no longer need mach/serial.h and can make it local to mach-omap2. Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-omap1/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-omap1/include/mach/serial.h53
-rw-r--r--arch/arm/mach-omap1/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-omap2/board-rm680.c1
-rw-r--r--arch/arm/mach-omap2/common.h3
-rw-r--r--arch/arm/mach-omap2/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-omap2/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-omap2/io.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c3
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/serial.h (renamed from arch/arm/plat-omap/include/plat/serial.h)11
17 files changed, 64 insertions, 29 deletions
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S
index 2b36a281dc84..5c1a26c9f490 100644
--- a/arch/arm/mach-omap1/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap1/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include <linux/serial_reg.h> 14#include <linux/serial_reg.h>
15 15
16#include <plat/serial.h> 16#include "serial.h"
17 17
18 .pushsection .data 18 .pushsection .data
19omap_uart_phys: .word 0x0 19omap_uart_phys: .word 0x0
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h
index f9989d38c464..dc3237bd72d2 100644
--- a/arch/arm/mach-omap1/include/mach/hardware.h
+++ b/arch/arm/mach-omap1/include/mach/hardware.h
@@ -72,7 +72,7 @@ static inline u32 omap_cs3_phys(void)
72 72
73#endif /* ifndef __ASSEMBLER__ */ 73#endif /* ifndef __ASSEMBLER__ */
74 74
75#include <plat/serial.h> 75#include <mach/serial.h>
76 76
77/* 77/*
78 * --------------------------------------------------------------------------- 78 * ---------------------------------------------------------------------------
diff --git a/arch/arm/mach-omap1/include/mach/serial.h b/arch/arm/mach-omap1/include/mach/serial.h
new file mode 100644
index 000000000000..2ce6a2db470b
--- /dev/null
+++ b/arch/arm/mach-omap1/include/mach/serial.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright (C) 2009 Texas Instruments
3 * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
4 *
5 * This program is distributed in the hope that it will be useful,
6 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 * GNU General Public License for more details.
9 */
10
11#ifndef __ASM_ARCH_SERIAL_H
12#define __ASM_ARCH_SERIAL_H
13
14#include <linux/init.h>
15
16/*
17 * Memory entry used for the DEBUG_LL UART configuration, relative to
18 * start of RAM. See also uncompress.h and debug-macro.S.
19 *
20 * Note that using a memory location for storing the UART configuration
21 * has at least two limitations:
22 *
23 * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
24 * uncompress code could then partially overwrite itself
25 * 2. We assume printascii is called at least once before paging_init,
26 * and addruart has a chance to read OMAP_UART_INFO
27 */
28#define OMAP_UART_INFO_OFS 0x3ffc
29
30/* OMAP1 serial ports */
31#define OMAP1_UART1_BASE 0xfffb0000
32#define OMAP1_UART2_BASE 0xfffb0800
33#define OMAP1_UART3_BASE 0xfffb9800
34
35#define OMAP_PORT_SHIFT 2
36#define OMAP7XX_PORT_SHIFT 0
37
38#define OMAP1510_BASE_BAUD (12000000/16)
39#define OMAP16XX_BASE_BAUD (48000000/16)
40
41/*
42 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
43 * decomp_setup in uncompress.h
44 */
45#define OMAP1UART1 11
46#define OMAP1UART2 12
47#define OMAP1UART3 13
48
49#ifndef __ASSEMBLER__
50extern void omap_serial_init(void);
51#endif
52
53#endif
diff --git a/arch/arm/mach-omap1/include/mach/uncompress.h b/arch/arm/mach-omap1/include/mach/uncompress.h
index e9eb83468622..ad6fbe7d83f2 100644
--- a/arch/arm/mach-omap1/include/mach/uncompress.h
+++ b/arch/arm/mach-omap1/include/mach/uncompress.h
@@ -23,7 +23,7 @@
23#include <asm/memory.h> 23#include <asm/memory.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25 25
26#include <plat/serial.h> 26#include "serial.h"
27 27
28#define MDR1_MODE_MASK 0x07 28#define MDR1_MODE_MASK 0x07
29 29
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index d42ecfe56096..d0a33130aaaf 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -25,7 +25,6 @@
25#include <plat/usb.h> 25#include <plat/usb.h>
26#include "gpmc.h" 26#include "gpmc.h"
27#include "common.h" 27#include "common.h"
28#include <plat/serial.h>
29 28
30#include "mux.h" 29#include "mux.h"
31#include "mmc.h" 30#include "mmc.h"
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index d135d551d124..c85022ab22d5 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -34,11 +34,10 @@
34 34
35#include <asm/proc-fns.h> 35#include <asm/proc-fns.h>
36 36
37#include <plat/serial.h>
38
39#include "../plat-omap/common.h" 37#include "../plat-omap/common.h"
40 38
41#include "i2c.h" 39#include "i2c.h"
40#include "serial.h"
42 41
43#define OMAP_INTC_START NR_IRQS 42#define OMAP_INTC_START NR_IRQS
44 43
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index 93d10de7129f..4b5cbdfac028 100644
--- a/arch/arm/mach-omap2/include/mach/debug-macro.S
+++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
@@ -13,7 +13,7 @@
13 13
14#include <linux/serial_reg.h> 14#include <linux/serial_reg.h>
15 15
16#include <plat/serial.h> 16#include <../mach-omap2/serial.h>
17 17
18#define UART_OFFSET(addr) ((addr) & 0x00ffffff) 18#define UART_OFFSET(addr) ((addr) & 0x00ffffff)
19 19
diff --git a/arch/arm/mach-omap2/include/mach/uncompress.h b/arch/arm/mach-omap2/include/mach/uncompress.h
index 226c7571583b..28d1ec0e869a 100644
--- a/arch/arm/mach-omap2/include/mach/uncompress.h
+++ b/arch/arm/mach-omap2/include/mach/uncompress.h
@@ -23,7 +23,7 @@
23#include <asm/memory.h> 23#include <asm/memory.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25 25
26#include <plat/serial.h> 26#include <../mach-omap2/serial.h>
27 27
28#define MDR1_MODE_MASK 0x07 28#define MDR1_MODE_MASK 0x07
29 29
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 80d1cf17af8c..4fadc7895579 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -25,7 +25,6 @@
25#include <asm/tlb.h> 25#include <asm/tlb.h>
26#include <asm/mach/map.h> 26#include <asm/mach/map.h>
27 27
28#include <plat/serial.h>
29#include <plat-omap/dma-omap.h> 28#include <plat-omap/dma-omap.h>
30 29
31#include "../plat-omap/sram.h" 30#include "../plat-omap/sram.h"
@@ -43,6 +42,7 @@
43#include "clock44xx.h" 42#include "clock44xx.h"
44#include "omap-pm.h" 43#include "omap-pm.h"
45#include "sdrc.h" 44#include "sdrc.h"
45#include "serial.h"
46 46
47/* 47/*
48 * The machine specific code may provide the extra mapping besides the 48 * The machine specific code may provide the extra mapping besides the
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index 3efed3d633d1..a8b3368dca3d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -29,6 +29,7 @@
29#include "prm-regbits-24xx.h" 29#include "prm-regbits-24xx.h"
30#include "i2c.h" 30#include "i2c.h"
31#include "mmc.h" 31#include "mmc.h"
32#include "serial.h"
32#include "wd_timer.h" 33#include "wd_timer.h"
33 34
34/* 35/*
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
index 74ae76767510..0413daba2dba 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
@@ -13,8 +13,6 @@
13 */ 13 */
14#include <asm/sizes.h> 14#include <asm/sizes.h>
15 15
16#include <plat/serial.h>
17
18#include "omap_hwmod.h" 16#include "omap_hwmod.h"
19 17
20#include "omap_hwmod_common_data.h" 18#include "omap_hwmod_common_data.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 57fc2f95584d..05c6a5906550 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -10,7 +10,6 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <plat/serial.h>
14#include <plat-omap/dma-omap.h> 13#include <plat-omap/dma-omap.h>
15 14
16#include "../plat-omap/common.h" 15#include "../plat-omap/common.h"
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
index dd3809c8f409..47901a5e76de 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -13,11 +13,10 @@
13 */ 13 */
14#include <asm/sizes.h> 14#include <asm/sizes.h>
15 15
16#include <plat/serial.h>
17
18#include "omap_hwmod.h" 16#include "omap_hwmod.h"
19#include "l3_2xxx.h" 17#include "l3_2xxx.h"
20#include "l4_2xxx.h" 18#include "l4_2xxx.h"
19#include "serial.h"
21 20
22#include "omap_hwmod_common_data.h" 21#include "omap_hwmod_common_data.h"
23 22
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
index 27bdff46fda0..a0116d08cf45 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <plat/serial.h>
13#include <linux/platform_data/gpio-omap.h> 12#include <linux/platform_data/gpio-omap.h>
14#include <plat-omap/dma-omap.h> 13#include <plat-omap/dma-omap.h>
15#include <plat/dmtimer.h> 14#include <plat/dmtimer.h>
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index d5d52a776278..abe66ced903f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -20,8 +20,6 @@
20#include <linux/platform_data/gpio-omap.h> 20#include <linux/platform_data/gpio-omap.h>
21 21
22#include <plat-omap/dma-omap.h> 22#include <plat-omap/dma-omap.h>
23#include <plat/serial.h>
24
25#include "l3_3xxx.h" 23#include "l3_3xxx.h"
26#include "l4_3xxx.h" 24#include "l4_3xxx.h"
27#include <linux/platform_data/asoc-ti-mcbsp.h> 25#include <linux/platform_data/asoc-ti-mcbsp.h>
@@ -41,6 +39,7 @@
41#include "i2c.h" 39#include "i2c.h"
42#include "mmc.h" 40#include "mmc.h"
43#include "wd_timer.h" 41#include "wd_timer.h"
42#include "serial.h"
44 43
45/* 44/*
46 * OMAP3xxx hardware module integration data 45 * OMAP3xxx hardware module integration data
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 12363f313f08..812976eac536 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -29,7 +29,6 @@
29 29
30#include <plat/omap-serial.h> 30#include <plat/omap-serial.h>
31#include <plat-omap/dma-omap.h> 31#include <plat-omap/dma-omap.h>
32#include <plat/serial.h>
33 32
34#include "common.h" 33#include "common.h"
35#include "omap_hwmod.h" 34#include "omap_hwmod.h"
@@ -42,6 +41,7 @@
42#include "prm-regbits-34xx.h" 41#include "prm-regbits-34xx.h"
43#include "control.h" 42#include "control.h"
44#include "mux.h" 43#include "mux.h"
44#include "serial.h"
45 45
46/* 46/*
47 * NOTE: By default the serial auto_suspend timeout is disabled as it causes 47 * NOTE: By default the serial auto_suspend timeout is disabled as it causes
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/mach-omap2/serial.h
index b780470d03ea..6a6806271fcf 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/mach-omap2/serial.h
@@ -29,11 +29,6 @@
29 */ 29 */
30#define OMAP_UART_INFO_OFS 0x3ffc 30#define OMAP_UART_INFO_OFS 0x3ffc
31 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 */ 32/* OMAP2 serial ports */
38#define OMAP2_UART1_BASE 0x4806a000 33#define OMAP2_UART1_BASE 0x4806a000
39#define OMAP2_UART2_BASE 0x4806c000 34#define OMAP2_UART2_BASE 0x4806c000
@@ -76,20 +71,14 @@
76#define ZOOM_UART_VIRT 0xfa400000 71#define ZOOM_UART_VIRT 0xfa400000
77 72
78#define OMAP_PORT_SHIFT 2 73#define OMAP_PORT_SHIFT 2
79#define OMAP7XX_PORT_SHIFT 0
80#define ZOOM_PORT_SHIFT 1 74#define ZOOM_PORT_SHIFT 1
81 75
82#define OMAP1510_BASE_BAUD (12000000/16)
83#define OMAP16XX_BASE_BAUD (48000000/16)
84#define OMAP24XX_BASE_BAUD (48000000/16) 76#define OMAP24XX_BASE_BAUD (48000000/16)
85 77
86/* 78/*
87 * DEBUG_LL port encoding stored into the UART1 scratchpad register by 79 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
88 * decomp_setup in uncompress.h 80 * decomp_setup in uncompress.h
89 */ 81 */
90#define OMAP1UART1 11
91#define OMAP1UART2 12
92#define OMAP1UART3 13
93#define OMAP2UART1 21 82#define OMAP2UART1 21
94#define OMAP2UART2 22 83#define OMAP2UART2 22
95#define OMAP2UART3 23 84#define OMAP2UART3 23