Patchwork [U-Boot,2/5] Serial: Add UART support for Marvell ARMADA 100 SoCs.

login
register
mail settings
Submitter Prafulla Wadaskar
Date Oct. 27, 2010, 1:53 p.m.
Message ID <1288187604-3371-3-git-send-email-prafulla@marvell.com>
Download mbox | patch
Permalink /patch/71942/
State Superseded
Headers show

Comments

Prafulla Wadaskar - Oct. 27, 2010, 1:53 p.m.
From: Prafulla WADASKAR <prafulla@marvell.com>

ARMADA 100 SoCs has NS16550 compatible UART peripheral
This patch enables the same for ARMADA100 platforms

Signed-off-by: Mahavir Jain <mjain@marvell.com>
Signed-off-by: Prafulla WADASKAR <prafulla@marvell.com>
---
 drivers/serial/ns16550.c |   16 ++++++++++++++++
 drivers/serial/serial.c  |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 32f24de..e57ed1f 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -26,7 +26,15 @@ 
 
 void NS16550_init (NS16550_t com_port, int baud_divisor)
 {
+#ifdef CONFIG_ARMADA100
+	/*
+	 * For ARMADA 100 Based Processors bit 6 in IER register
+	 * represents UART Unit Enable bit.
+	 */
+	serial_out((1 << 6), &com_port->ier);
+#else
 	serial_out(0x00, &com_port->ier);
+#endif
 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	serial_out(0x7, &com_port->mdr1);	/* mode select reset TL16C750*/
 #endif
@@ -52,7 +60,15 @@  void NS16550_init (NS16550_t com_port, int baud_divisor)
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
 void NS16550_reinit (NS16550_t com_port, int baud_divisor)
 {
+#ifdef CONFIG_ARMADA100
+	/*
+	 * For ARMADA 100 Based Processors bit 6 in IER register
+	 * represents UART Unit Enable bit.
+	 */
+	serial_out((1 << 6), &com_port->ier);
+#else
 	serial_out(0x00, &com_port->ier);
+#endif
 	serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr);
 	serial_out(0, &com_port->dll);
 	serial_out(0, &com_port->dlm);
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 1073ac0..f9a964e 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -33,6 +33,9 @@ 
 #ifdef CONFIG_ORION5X
 #include <asm/arch/orion5x.h>
 #endif
+#ifdef CONFIG_ARMADA100
+#include <asm/arch/armada100.h>
+#endif
 
 #if defined (CONFIG_SERIAL_MULTI)
 #include <serial.h>