[PATCH 3/9] omap_uart: rename OMAP3EVM_UARTx to OMAP_UARTx

Vicente Bergas vicencb at gmail.com
Sat Mar 9 18:19:36 EST 2013


 use a more generic UART selection on OMAP so it can be extended to
other OMAPs

Signed-off-by: Vicente Bergas <vicencb at gmail.com>
---
 arch/arm/boards/omap3evm/board.c           |  4 ++--
 arch/arm/boards/omap3evm/lowlevel.c        |  4 ++--
 arch/arm/mach-omap/Kconfig                 | 11 ++++++-----
 arch/arm/mach-omap/include/mach/debug_ll.h |  6 +++++-
 4 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boards/omap3evm/board.c b/arch/arm/boards/omap3evm/board.c
index 7585541..7284f5f 100644
--- a/arch/arm/boards/omap3evm/board.c
+++ b/arch/arm/boards/omap3evm/board.c
@@ -62,9 +62,9 @@
  */
 static int omap3evm_init_console(void)
 {
-	if (IS_ENABLED(CONFIG_OMAP3EVM_UART1))
+	if (IS_ENABLED(CONFIG_OMAP_UART1))
 		omap3_add_uart1();
-	if (IS_ENABLED(CONFIG_OMAP3EVM_UART3))
+	if (IS_ENABLED(CONFIG_OMAP_UART3))
 		omap3_add_uart3();
 
 	return 0;
diff --git a/arch/arm/boards/omap3evm/lowlevel.c b/arch/arm/boards/omap3evm/lowlevel.c
index 74e1315..2d9e130 100644
--- a/arch/arm/boards/omap3evm/lowlevel.c
+++ b/arch/arm/boards/omap3evm/lowlevel.c
@@ -122,12 +122,12 @@ static void mux_config(void)
 	/*
 	 * Serial Interface
 	 */
-#if defined(CONFIG_OMAP3EVM_UART1)
+#if defined(CONFIG_OMAP_UART1)
 	MUX_VAL(CP(UART1_TX),		(IDIS | PTD | DIS | M0));
 	MUX_VAL(CP(UART1_RTS),		(IDIS | PTD | DIS | M0));
 	MUX_VAL(CP(UART1_CTS),		(IEN  | PTU | DIS | M0));
 	MUX_VAL(CP(UART1_RX),		(IEN  | PTD | DIS | M0));
-#elif defined(CONFIG_OMAP3EVM_UART3)
+#elif defined(CONFIG_OMAP_UART3)
 	MUX_VAL(CP(UART3_CTS_RCTX),	(IEN  | PTD | EN  | M0));
 	MUX_VAL(CP(UART3_RTS_SD),	(IDIS | PTD | DIS | M0));
 	MUX_VAL(CP(UART3_RX_IRRX),	(IEN  | PTD | DIS | M0));
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index a87fc4b..42e5f4a 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -187,20 +187,21 @@ config MACH_PCM051
 
 endchoice
 
-if MACH_OMAP3EVM
+if ARCH_OMAP
 
 choice
 	prompt "Select UART"
+	default OMAP_UART3
 
-	config OMAP3EVM_UART1
+	config OMAP_UART1
 		bool "Use UART1"
-		depends on MACH_OMAP3EVM
+		depends on ARCH_OMAP
 		help
 		  Say Y here if you would like to use UART1 as console.
 
-	config OMAP3EVM_UART3
+	config OMAP_UART3
 		bool "Use UART3"
-		depends on MACH_OMAP3EVM
+		depends on ARCH_OMAP
 		help
 		  Say Y here if you would like to use UART3 as console.
 
diff --git a/arch/arm/mach-omap/include/mach/debug_ll.h b/arch/arm/mach-omap/include/mach/debug_ll.h
index ed1777b..eea6eb3 100644
--- a/arch/arm/mach-omap/include/mach/debug_ll.h
+++ b/arch/arm/mach-omap/include/mach/debug_ll.h
@@ -22,7 +22,7 @@
 #ifdef CONFIG_ARCH_OMAP3
 #include <mach/omap3-silicon.h>
 
-#ifdef CONFIG_OMAP3EVM_UART1
+#ifdef CONFIG_OMAP_UART1
 #define UART_BASE	OMAP3_UART1_BASE
 #else
 #define UART_BASE	OMAP3_UART3_BASE
@@ -32,8 +32,12 @@
 
 #ifdef CONFIG_ARCH_OMAP4
 #include <mach/omap4-silicon.h>
+#ifdef CONFIG_OMAP_UART1
+#define UART_BASE	OMAP44XX_UART1_BASE
+#else
 #define UART_BASE	OMAP44XX_UART3_BASE
 #endif
+#endif
 
 #ifdef CONFIG_ARCH_AM33XX
 #include <mach/am33xx-silicon.h>
-- 
1.8.1.5




More information about the barebox mailing list