[PATCH 5/5] OMAP4: serial: Initialise the uart mux pins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the mux framework to initialise the uart mux pins.

Signed-off-by: sricharan <r.sricharan@xxxxxx>
---
 arch/arm/mach-omap2/serial.c |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index ba8a5cc..6890054 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -44,6 +44,7 @@
 #include "cm.h"
 #include "prm-regbits-34xx.h"
 #include "control.h"
+#include "mux.h"
 
 #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV	0x52
 #define UART_OMAP_WER		0x17	/* Wake-up enable register */
@@ -839,6 +840,41 @@ void __init omap_serial_init_port(int port)
 		uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
 }
 
+/*
+ * omap_serial_init_mux() - Initialize the PINMUX configurations
+ * for all supported UART modules.
+ */
+static void __init omap_serial_init_mux(void)
+{
+	if (cpu_is_omap44xx()) {
+		/* UART 2 MUX */
+		omap_mux_init_signal("uart2_cts.uart2_cts",
+					OMAP_PIN_INPUT_PULLUP);
+		omap_mux_init_signal("uart2_rts.uart2_rts",
+					OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("uart2_rx.uart2_rx",
+					OMAP_PIN_INPUT_PULLUP);
+		omap_mux_init_signal("uart2_tx.uart2_tx",
+					OMAP_PIN_OUTPUT);
+
+		/* UART 3 MUX */
+		omap_mux_init_signal("uart3_cts_rctx.uart3_cts_rctx",
+					OMAP_PIN_INPUT_PULLUP);
+		omap_mux_init_signal("uart3_rts_sd.uart3_rts_sd",
+					OMAP_PIN_OUTPUT);
+		omap_mux_init_signal("uart3_rx_irrx.uart3_rx_irrx",
+					OMAP_PIN_INPUT);
+		omap_mux_init_signal("uart3_tx_irtx.uart3_tx_irtx",
+					OMAP_PIN_OUTPUT);
+
+		/* UART 4 MUX */
+		omap_mux_init_signal("uart4_rx.uart4_rx",
+					OMAP_PIN_INPUT);
+		omap_mux_init_signal("uart4_tx.uart4_tx",
+					OMAP_PIN_OUTPUT);
+	}
+}
+
 /**
  * omap_serial_init() - intialize all supported serial ports
  *
@@ -850,6 +886,8 @@ void __init omap_serial_init(void)
 {
 	struct omap_uart_state *uart;
 
+	omap_serial_init_mux();
+
 	list_for_each_entry(uart, &uart_list, node)
 		omap_serial_init_port(uart->num);
 }
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux