aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-10-31 17:57:06 -0400
committerTony Lindgren <tony@atomide.com>2012-10-31 18:37:14 -0400
commit2c0b495b7cf87012ece69e845c47c4da78a52c5c (patch)
treed3cc54551c183c8e067780abf573785ac9918e3d /arch
parent21d182bd10ad16e904f3e4ba0ed51f00a19c0dda (diff)
ARM: OMAP2+: Fix relative includes for serial.h
As discussed on linux-arm-kernel, we want to avoid relative includes for the arch/arm/*omap* code: http://www.spinics.net/lists/linux-omap/msg80520.html Fix serial.h by moving it to mach/serial.h. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-omap2/include/mach/serial.h103
-rw-r--r--arch/arm/mach-omap2/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-omap2/serial.h113
4 files changed, 106 insertions, 114 deletions
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S
index 4b5cbdfac028..cfaed13d0040 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 <../mach-omap2/serial.h> 16#include <mach/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/serial.h b/arch/arm/mach-omap2/include/mach/serial.h
new file mode 100644
index 000000000000..70eda00db7a4
--- /dev/null
+++ b/arch/arm/mach-omap2/include/mach/serial.h
@@ -0,0 +1,103 @@
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/*
12 * Memory entry used for the DEBUG_LL UART configuration, relative to
13 * start of RAM. See also uncompress.h and debug-macro.S.
14 *
15 * Note that using a memory location for storing the UART configuration
16 * has at least two limitations:
17 *
18 * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
19 * uncompress code could then partially overwrite itself
20 * 2. We assume printascii is called at least once before paging_init,
21 * and addruart has a chance to read OMAP_UART_INFO
22 */
23#define OMAP_UART_INFO_OFS 0x3ffc
24
25/* OMAP2 serial ports */
26#define OMAP2_UART1_BASE 0x4806a000
27#define OMAP2_UART2_BASE 0x4806c000
28#define OMAP2_UART3_BASE 0x4806e000
29
30/* OMAP3 serial ports */
31#define OMAP3_UART1_BASE OMAP2_UART1_BASE
32#define OMAP3_UART2_BASE OMAP2_UART2_BASE
33#define OMAP3_UART3_BASE 0x49020000
34#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
35#define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */
36
37/* OMAP4 serial ports */
38#define OMAP4_UART1_BASE OMAP2_UART1_BASE
39#define OMAP4_UART2_BASE OMAP2_UART2_BASE
40#define OMAP4_UART3_BASE 0x48020000
41#define OMAP4_UART4_BASE 0x4806e000
42
43/* TI81XX serial ports */
44#define TI81XX_UART1_BASE 0x48020000
45#define TI81XX_UART2_BASE 0x48022000
46#define TI81XX_UART3_BASE 0x48024000
47
48/* AM3505/3517 UART4 */
49#define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
50
51/* AM33XX serial port */
52#define AM33XX_UART1_BASE 0x44E09000
53
54/* OMAP5 serial ports */
55#define OMAP5_UART1_BASE OMAP2_UART1_BASE
56#define OMAP5_UART2_BASE OMAP2_UART2_BASE
57#define OMAP5_UART3_BASE OMAP4_UART3_BASE
58#define OMAP5_UART4_BASE OMAP4_UART4_BASE
59#define OMAP5_UART5_BASE 0x48066000
60#define OMAP5_UART6_BASE 0x48068000
61
62/* External port on Zoom2/3 */
63#define ZOOM_UART_BASE 0x10000000
64#define ZOOM_UART_VIRT 0xfa400000
65
66#define OMAP_PORT_SHIFT 2
67#define ZOOM_PORT_SHIFT 1
68
69#define OMAP24XX_BASE_BAUD (48000000/16)
70
71/*
72 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
73 * decomp_setup in uncompress.h
74 */
75#define OMAP2UART1 21
76#define OMAP2UART2 22
77#define OMAP2UART3 23
78#define OMAP3UART1 OMAP2UART1
79#define OMAP3UART2 OMAP2UART2
80#define OMAP3UART3 33
81#define OMAP3UART4 34 /* Only on 36xx */
82#define OMAP4UART1 OMAP2UART1
83#define OMAP4UART2 OMAP2UART2
84#define OMAP4UART3 43
85#define OMAP4UART4 44
86#define TI81XXUART1 81
87#define TI81XXUART2 82
88#define TI81XXUART3 83
89#define AM33XXUART1 84
90#define OMAP5UART3 OMAP4UART3
91#define OMAP5UART4 OMAP4UART4
92#define ZOOM_UART 95 /* Only on zoom2/3 */
93
94#ifndef __ASSEMBLER__
95
96struct omap_board_data;
97struct omap_uart_port_info;
98
99extern void omap_serial_init(void);
100extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
101extern void omap_serial_init_port(struct omap_board_data *bdata,
102 struct omap_uart_port_info *platform_data);
103#endif
diff --git a/arch/arm/mach-omap2/include/mach/uncompress.h b/arch/arm/mach-omap2/include/mach/uncompress.h
index 28d1ec0e869a..8e3546d3e041 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 <../mach-omap2/serial.h> 26#include <mach/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/serial.h b/arch/arm/mach-omap2/serial.h
index 6a6806271fcf..c4014f013df0 100644
--- a/arch/arm/mach-omap2/serial.h
+++ b/arch/arm/mach-omap2/serial.h
@@ -1,112 +1 @@
1/* #include <mach/serial.h>
2 * arch/arm/plat-omap/include/mach/serial.h
3 *
4 * Copyright (C) 2009 Texas Instruments
5 * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
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
16#include <linux/init.h>
17
18/*
19 * Memory entry used for the DEBUG_LL UART configuration, relative to
20 * start of RAM. See also uncompress.h and debug-macro.S.
21 *
22 * Note that using a memory location for storing the UART configuration
23 * has at least two limitations:
24 *
25 * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
26 * uncompress code could then partially overwrite itself
27 * 2. We assume printascii is called at least once before paging_init,
28 * and addruart has a chance to read OMAP_UART_INFO
29 */
30#define OMAP_UART_INFO_OFS 0x3ffc
31
32/* OMAP2 serial ports */
33#define OMAP2_UART1_BASE 0x4806a000
34#define OMAP2_UART2_BASE 0x4806c000
35#define OMAP2_UART3_BASE 0x4806e000
36
37/* OMAP3 serial ports */
38#define OMAP3_UART1_BASE OMAP2_UART1_BASE
39#define OMAP3_UART2_BASE OMAP2_UART2_BASE
40#define OMAP3_UART3_BASE 0x49020000
41#define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */
42#define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */
43
44/* OMAP4 serial ports */
45#define OMAP4_UART1_BASE OMAP2_UART1_BASE
46#define OMAP4_UART2_BASE OMAP2_UART2_BASE
47#define OMAP4_UART3_BASE 0x48020000
48#define OMAP4_UART4_BASE 0x4806e000
49
50/* TI81XX serial ports */
51#define TI81XX_UART1_BASE 0x48020000
52#define TI81XX_UART2_BASE 0x48022000
53#define TI81XX_UART3_BASE 0x48024000
54
55/* AM3505/3517 UART4 */
56#define AM35XX_UART4_BASE 0x4809E000 /* Only on AM3505/3517 */
57
58/* AM33XX serial port */
59#define AM33XX_UART1_BASE 0x44E09000
60
61/* OMAP5 serial ports */
62#define OMAP5_UART1_BASE OMAP2_UART1_BASE
63#define OMAP5_UART2_BASE OMAP2_UART2_BASE
64#define OMAP5_UART3_BASE OMAP4_UART3_BASE
65#define OMAP5_UART4_BASE OMAP4_UART4_BASE
66#define OMAP5_UART5_BASE 0x48066000
67#define OMAP5_UART6_BASE 0x48068000
68
69/* External port on Zoom2/3 */
70#define ZOOM_UART_BASE 0x10000000
71#define ZOOM_UART_VIRT 0xfa400000
72
73#define OMAP_PORT_SHIFT 2
74#define ZOOM_PORT_SHIFT 1
75
76#define OMAP24XX_BASE_BAUD (48000000/16)
77
78/*
79 * DEBUG_LL port encoding stored into the UART1 scratchpad register by
80 * decomp_setup in uncompress.h
81 */
82#define OMAP2UART1 21
83#define OMAP2UART2 22
84#define OMAP2UART3 23
85#define OMAP3UART1 OMAP2UART1
86#define OMAP3UART2 OMAP2UART2
87#define OMAP3UART3 33
88#define OMAP3UART4 34 /* Only on 36xx */
89#define OMAP4UART1 OMAP2UART1
90#define OMAP4UART2 OMAP2UART2
91#define OMAP4UART3 43
92#define OMAP4UART4 44
93#define TI81XXUART1 81
94#define TI81XXUART2 82
95#define TI81XXUART3 83
96#define AM33XXUART1 84
97#define OMAP5UART3 OMAP4UART3
98#define OMAP5UART4 OMAP4UART4
99#define ZOOM_UART 95 /* Only on zoom2/3 */
100
101#ifndef __ASSEMBLER__
102
103struct omap_board_data;
104struct omap_uart_port_info;
105
106extern void omap_serial_init(void);
107extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
108extern void omap_serial_init_port(struct omap_board_data *bdata,
109 struct omap_uart_port_info *platform_data);
110#endif
111
112#endif