]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ARM: OMAP: Split plat/serial.h for omap1 and omap2+
authorTony Lindgren <tony@atomide.com>
Mon, 15 Oct 2012 19:50:46 +0000 (12:50 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 24 Oct 2012 20:34:31 +0000 (13:34 -0700)
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>
18 files changed:
arch/arm/mach-omap1/include/mach/debug-macro.S
arch/arm/mach-omap1/include/mach/hardware.h
arch/arm/mach-omap1/include/mach/serial.h [new file with mode: 0644]
arch/arm/mach-omap1/include/mach/uncompress.h
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/include/mach/debug-macro.S
arch/arm/mach-omap2/include/mach/uncompress.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/serial.c
arch/arm/mach-omap2/serial.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/serial.h [deleted file]

index 2b36a281dc842a55757459860164369b763edd28..5c1a26c9f49059c646d54ec60a63dc79ef8dab17 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <linux/serial_reg.h>
 
-#include <plat/serial.h>
+#include "serial.h"
 
                .pushsection .data
 omap_uart_phys:        .word   0x0
index f9989d38c464bc74c468435226432e979e51cb22..dc3237bd72d249a285378e330bc925790c6cdd82 100644 (file)
@@ -72,7 +72,7 @@ static inline u32 omap_cs3_phys(void)
 
 #endif /* ifndef __ASSEMBLER__ */
 
-#include <plat/serial.h>
+#include <mach/serial.h>
 
 /*
  * ---------------------------------------------------------------------------
diff --git a/arch/arm/mach-omap1/include/mach/serial.h b/arch/arm/mach-omap1/include/mach/serial.h
new file mode 100644 (file)
index 0000000..2ce6a2d
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+#include <linux/init.h>
+
+/*
+ * Memory entry used for the DEBUG_LL UART configuration, relative to
+ * start of RAM. See also uncompress.h and debug-macro.S.
+ *
+ * Note that using a memory location for storing the UART configuration
+ * has at least two limitations:
+ *
+ * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
+ *    uncompress code could then partially overwrite itself
+ * 2. We assume printascii is called at least once before paging_init,
+ *    and addruart has a chance to read OMAP_UART_INFO
+ */
+#define OMAP_UART_INFO_OFS     0x3ffc
+
+/* OMAP1 serial ports */
+#define OMAP1_UART1_BASE       0xfffb0000
+#define OMAP1_UART2_BASE       0xfffb0800
+#define OMAP1_UART3_BASE       0xfffb9800
+
+#define OMAP_PORT_SHIFT                2
+#define OMAP7XX_PORT_SHIFT     0
+
+#define OMAP1510_BASE_BAUD     (12000000/16)
+#define OMAP16XX_BASE_BAUD     (48000000/16)
+
+/*
+ * DEBUG_LL port encoding stored into the UART1 scratchpad register by
+ * decomp_setup in uncompress.h
+ */
+#define OMAP1UART1             11
+#define OMAP1UART2             12
+#define OMAP1UART3             13
+
+#ifndef __ASSEMBLER__
+extern void omap_serial_init(void);
+#endif
+
+#endif
index e9eb834686228aee3c6150b35d09aa3b777b9ae6..ad6fbe7d83f2d04d897da79678ff1d577006fc8e 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/memory.h>
 #include <asm/mach-types.h>
 
-#include <plat/serial.h>
+#include "serial.h"
 
 #define MDR1_MODE_MASK                 0x07
 
index d42ecfe56096fa061367653119dc5128039b2778..d0a33130aaaf0113695eb1ff59f27c6b57936e24 100644 (file)
@@ -25,7 +25,6 @@
 #include <plat/usb.h>
 #include "gpmc.h"
 #include "common.h"
-#include <plat/serial.h>
 
 #include "mux.h"
 #include "mmc.h"
index d135d551d124790b80881d1568ee8359a3a5f1d5..c85022ab22d559f73bc9836a2dd49ca895113461 100644 (file)
 
 #include <asm/proc-fns.h>
 
-#include <plat/serial.h>
-
 #include "../plat-omap/common.h"
 
 #include "i2c.h"
+#include "serial.h"
 
 #define OMAP_INTC_START                NR_IRQS
 
index 93d10de7129fc550bea299921a3a0f3a62239630..4b5cbdfac028e629143b2d0473887e4618ee56cd 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <linux/serial_reg.h>
 
-#include <plat/serial.h>
+#include <../mach-omap2/serial.h>
 
 #define UART_OFFSET(addr)      ((addr) & 0x00ffffff)
 
index 226c7571583ba32e47d25e978ae6b1950e3fb861..28d1ec0e869aa57fd8147647eeee2a6afdd4fdd2 100644 (file)
@@ -23,7 +23,7 @@
 #include <asm/memory.h>
 #include <asm/mach-types.h>
 
-#include <plat/serial.h>
+#include <../mach-omap2/serial.h>
 
 #define MDR1_MODE_MASK                 0x07
 
index 80d1cf17af8c661efbdfa690f41754722094588c..4fadc7895579a10523b94ca833a78a13b7d04a2e 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
 
-#include <plat/serial.h>
 #include <plat-omap/dma-omap.h>
 
 #include "../plat-omap/sram.h"
@@ -43,6 +42,7 @@
 #include "clock44xx.h"
 #include "omap-pm.h"
 #include "sdrc.h"
+#include "serial.h"
 
 /*
  * The machine specific code may provide the extra mapping besides the
index 3efed3d633d15654c2a001ae308391c7d3375bc8..a8b3368dca3dff7825509174d903595ae4d1da87 100644 (file)
@@ -29,6 +29,7 @@
 #include "prm-regbits-24xx.h"
 #include "i2c.h"
 #include "mmc.h"
+#include "serial.h"
 #include "wd_timer.h"
 
 /*
index 74ae767675108684dab82c53a229260492fb2c75..0413daba2dba1bdc88e4522cf9c6c04bf76acca0 100644 (file)
@@ -13,8 +13,6 @@
  */
 #include <asm/sizes.h>
 
-#include <plat/serial.h>
-
 #include "omap_hwmod.h"
 
 #include "omap_hwmod_common_data.h"
index 57fc2f95584d6b50822b744af998f95927a75e67..05c6a5906550bd569b71c44fcdc0897fa03925c3 100644 (file)
@@ -10,7 +10,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <plat/serial.h>
 #include <plat-omap/dma-omap.h>
 
 #include "../plat-omap/common.h"
index dd3809c8f4091ed48fae1884d48b759d4ea528e2..47901a5e76de517b9f86d5f4bc83b0614857e5e1 100644 (file)
  */
 #include <asm/sizes.h>
 
-#include <plat/serial.h>
-
 #include "omap_hwmod.h"
 #include "l3_2xxx.h"
 #include "l4_2xxx.h"
+#include "serial.h"
 
 #include "omap_hwmod_common_data.h"
 
index 27bdff46fda047752738ccda30c63c3d74a0021f..a0116d08cf4575bd5cc604feed0595019b9c4611 100644 (file)
@@ -9,7 +9,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <plat/serial.h>
 #include <linux/platform_data/gpio-omap.h>
 #include <plat-omap/dma-omap.h>
 #include <plat/dmtimer.h>
index d5d52a7762784f1c4fe8c1ae91e98ea416b9608b..abe66ced903fe0e5a032bd827f547c79640fffc1 100644 (file)
@@ -20,8 +20,6 @@
 #include <linux/platform_data/gpio-omap.h>
 
 #include <plat-omap/dma-omap.h>
-#include <plat/serial.h>
-
 #include "l3_3xxx.h"
 #include "l4_3xxx.h"
 #include <linux/platform_data/asoc-ti-mcbsp.h>
@@ -41,6 +39,7 @@
 #include "i2c.h"
 #include "mmc.h"
 #include "wd_timer.h"
+#include "serial.h"
 
 /*
  * OMAP3xxx hardware module integration data
index 12363f313f08f4c53f66ec78c38f738021820730..812976eac5364818033e4626e31f14de24c5865f 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <plat/omap-serial.h>
 #include <plat-omap/dma-omap.h>
-#include <plat/serial.h>
 
 #include "common.h"
 #include "omap_hwmod.h"
@@ -42,6 +41,7 @@
 #include "prm-regbits-34xx.h"
 #include "control.h"
 #include "mux.h"
+#include "serial.h"
 
 /*
  * NOTE: By default the serial auto_suspend timeout is disabled as it causes
diff --git a/arch/arm/mach-omap2/serial.h b/arch/arm/mach-omap2/serial.h
new file mode 100644 (file)
index 0000000..6a68062
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * arch/arm/plat-omap/include/mach/serial.h
+ *
+ * Copyright (C) 2009 Texas Instruments
+ * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_SERIAL_H
+#define __ASM_ARCH_SERIAL_H
+
+#include <linux/init.h>
+
+/*
+ * Memory entry used for the DEBUG_LL UART configuration, relative to
+ * start of RAM. See also uncompress.h and debug-macro.S.
+ *
+ * Note that using a memory location for storing the UART configuration
+ * has at least two limitations:
+ *
+ * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
+ *    uncompress code could then partially overwrite itself
+ * 2. We assume printascii is called at least once before paging_init,
+ *    and addruart has a chance to read OMAP_UART_INFO
+ */
+#define OMAP_UART_INFO_OFS     0x3ffc
+
+/* OMAP2 serial ports */
+#define OMAP2_UART1_BASE       0x4806a000
+#define OMAP2_UART2_BASE       0x4806c000
+#define OMAP2_UART3_BASE       0x4806e000
+
+/* OMAP3 serial ports */
+#define OMAP3_UART1_BASE       OMAP2_UART1_BASE
+#define OMAP3_UART2_BASE       OMAP2_UART2_BASE
+#define OMAP3_UART3_BASE       0x49020000
+#define OMAP3_UART4_BASE       0x49042000      /* Only on 36xx */
+#define OMAP3_UART4_AM35XX_BASE        0x4809E000      /* Only on AM35xx */
+
+/* OMAP4 serial ports */
+#define OMAP4_UART1_BASE       OMAP2_UART1_BASE
+#define OMAP4_UART2_BASE       OMAP2_UART2_BASE
+#define OMAP4_UART3_BASE       0x48020000
+#define OMAP4_UART4_BASE       0x4806e000
+
+/* TI81XX serial ports */
+#define TI81XX_UART1_BASE      0x48020000
+#define TI81XX_UART2_BASE      0x48022000
+#define TI81XX_UART3_BASE      0x48024000
+
+/* AM3505/3517 UART4 */
+#define AM35XX_UART4_BASE      0x4809E000      /* Only on AM3505/3517 */
+
+/* AM33XX serial port */
+#define AM33XX_UART1_BASE      0x44E09000
+
+/* OMAP5 serial ports */
+#define OMAP5_UART1_BASE       OMAP2_UART1_BASE
+#define OMAP5_UART2_BASE       OMAP2_UART2_BASE
+#define OMAP5_UART3_BASE       OMAP4_UART3_BASE
+#define OMAP5_UART4_BASE       OMAP4_UART4_BASE
+#define OMAP5_UART5_BASE       0x48066000
+#define OMAP5_UART6_BASE       0x48068000
+
+/* External port on Zoom2/3 */
+#define ZOOM_UART_BASE         0x10000000
+#define ZOOM_UART_VIRT         0xfa400000
+
+#define OMAP_PORT_SHIFT                2
+#define ZOOM_PORT_SHIFT                1
+
+#define OMAP24XX_BASE_BAUD     (48000000/16)
+
+/*
+ * DEBUG_LL port encoding stored into the UART1 scratchpad register by
+ * decomp_setup in uncompress.h
+ */
+#define OMAP2UART1             21
+#define OMAP2UART2             22
+#define OMAP2UART3             23
+#define OMAP3UART1             OMAP2UART1
+#define OMAP3UART2             OMAP2UART2
+#define OMAP3UART3             33
+#define OMAP3UART4             34              /* Only on 36xx */
+#define OMAP4UART1             OMAP2UART1
+#define OMAP4UART2             OMAP2UART2
+#define OMAP4UART3             43
+#define OMAP4UART4             44
+#define TI81XXUART1            81
+#define TI81XXUART2            82
+#define TI81XXUART3            83
+#define AM33XXUART1            84
+#define OMAP5UART3             OMAP4UART3
+#define OMAP5UART4             OMAP4UART4
+#define ZOOM_UART              95              /* Only on zoom2/3 */
+
+#ifndef __ASSEMBLER__
+
+struct omap_board_data;
+struct omap_uart_port_info;
+
+extern void omap_serial_init(void);
+extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
+extern void omap_serial_init_port(struct omap_board_data *bdata,
+               struct omap_uart_port_info *platform_data);
+#endif
+
+#endif
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
deleted file mode 100644 (file)
index b780470..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/serial.h
- *
- * Copyright (C) 2009 Texas Instruments
- * Added OMAP4 support- Santosh Shilimkar <santosh.shilimkar@ti.com>
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_SERIAL_H
-#define __ASM_ARCH_SERIAL_H
-
-#include <linux/init.h>
-
-/*
- * Memory entry used for the DEBUG_LL UART configuration, relative to
- * start of RAM. See also uncompress.h and debug-macro.S.
- *
- * Note that using a memory location for storing the UART configuration
- * has at least two limitations:
- *
- * 1. Kernel uncompress code cannot overlap OMAP_UART_INFO as the
- *    uncompress code could then partially overwrite itself
- * 2. We assume printascii is called at least once before paging_init,
- *    and addruart has a chance to read OMAP_UART_INFO
- */
-#define OMAP_UART_INFO_OFS     0x3ffc
-
-/* OMAP1 serial ports */
-#define OMAP1_UART1_BASE       0xfffb0000
-#define OMAP1_UART2_BASE       0xfffb0800
-#define OMAP1_UART3_BASE       0xfffb9800
-
-/* OMAP2 serial ports */
-#define OMAP2_UART1_BASE       0x4806a000
-#define OMAP2_UART2_BASE       0x4806c000
-#define OMAP2_UART3_BASE       0x4806e000
-
-/* OMAP3 serial ports */
-#define OMAP3_UART1_BASE       OMAP2_UART1_BASE
-#define OMAP3_UART2_BASE       OMAP2_UART2_BASE
-#define OMAP3_UART3_BASE       0x49020000
-#define OMAP3_UART4_BASE       0x49042000      /* Only on 36xx */
-#define OMAP3_UART4_AM35XX_BASE        0x4809E000      /* Only on AM35xx */
-
-/* OMAP4 serial ports */
-#define OMAP4_UART1_BASE       OMAP2_UART1_BASE
-#define OMAP4_UART2_BASE       OMAP2_UART2_BASE
-#define OMAP4_UART3_BASE       0x48020000
-#define OMAP4_UART4_BASE       0x4806e000
-
-/* TI81XX serial ports */
-#define TI81XX_UART1_BASE      0x48020000
-#define TI81XX_UART2_BASE      0x48022000
-#define TI81XX_UART3_BASE      0x48024000
-
-/* AM3505/3517 UART4 */
-#define AM35XX_UART4_BASE      0x4809E000      /* Only on AM3505/3517 */
-
-/* AM33XX serial port */
-#define AM33XX_UART1_BASE      0x44E09000
-
-/* OMAP5 serial ports */
-#define OMAP5_UART1_BASE       OMAP2_UART1_BASE
-#define OMAP5_UART2_BASE       OMAP2_UART2_BASE
-#define OMAP5_UART3_BASE       OMAP4_UART3_BASE
-#define OMAP5_UART4_BASE       OMAP4_UART4_BASE
-#define OMAP5_UART5_BASE       0x48066000
-#define OMAP5_UART6_BASE       0x48068000
-
-/* External port on Zoom2/3 */
-#define ZOOM_UART_BASE         0x10000000
-#define ZOOM_UART_VIRT         0xfa400000
-
-#define OMAP_PORT_SHIFT                2
-#define OMAP7XX_PORT_SHIFT     0
-#define ZOOM_PORT_SHIFT                1
-
-#define OMAP1510_BASE_BAUD     (12000000/16)
-#define OMAP16XX_BASE_BAUD     (48000000/16)
-#define OMAP24XX_BASE_BAUD     (48000000/16)
-
-/*
- * DEBUG_LL port encoding stored into the UART1 scratchpad register by
- * decomp_setup in uncompress.h
- */
-#define OMAP1UART1             11
-#define OMAP1UART2             12
-#define OMAP1UART3             13
-#define OMAP2UART1             21
-#define OMAP2UART2             22
-#define OMAP2UART3             23
-#define OMAP3UART1             OMAP2UART1
-#define OMAP3UART2             OMAP2UART2
-#define OMAP3UART3             33
-#define OMAP3UART4             34              /* Only on 36xx */
-#define OMAP4UART1             OMAP2UART1
-#define OMAP4UART2             OMAP2UART2
-#define OMAP4UART3             43
-#define OMAP4UART4             44
-#define TI81XXUART1            81
-#define TI81XXUART2            82
-#define TI81XXUART3            83
-#define AM33XXUART1            84
-#define OMAP5UART3             OMAP4UART3
-#define OMAP5UART4             OMAP4UART4
-#define ZOOM_UART              95              /* Only on zoom2/3 */
-
-#ifndef __ASSEMBLER__
-
-struct omap_board_data;
-struct omap_uart_port_info;
-
-extern void omap_serial_init(void);
-extern void omap_serial_board_init(struct omap_uart_port_info *platform_data);
-extern void omap_serial_init_port(struct omap_board_data *bdata,
-               struct omap_uart_port_info *platform_data);
-#endif
-
-#endif