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

Prafulla Wadaskar prafulla at marvell.com
Wed Oct 27 15:53:21 CEST 2010


From: Prafulla WADASKAR <prafulla at marvell.com>

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

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

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>
-- 
1.7.2.1



More information about the U-Boot mailing list