From patchwork Wed Oct 27 13:53:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prafulla Wadaskar X-Patchwork-Id: 71942 Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 1023E152452 for ; Wed, 27 Oct 2010 11:36:17 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id F08BF3364F8D for ; Wed, 27 Oct 2010 11:36:16 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 27 Oct 2010 11:36:16 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 27 Oct 2010 11:36:09 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 27 Oct 2010 11:36:09 +0200 Received: from scanner-3.m-online.net (unknown [192.168.6.168]) by mail.m-online.net (Postfix) with ESMTP id 6F3591C00173; Wed, 27 Oct 2010 11:36:09 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id A845746C0AC; Wed, 27 Oct 2010 11:36:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C57AB28170; Wed, 27 Oct 2010 11:36:05 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xVWmRnn6ckHm; Wed, 27 Oct 2010 11:36:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 056C028120; Wed, 27 Oct 2010 11:35:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0DB112810A for ; Wed, 27 Oct 2010 11:35:55 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YeKlqVurXzwa for ; Wed, 27 Oct 2010 11:35:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from dakia2.marvell.com (dakia2.marvell.com [65.219.4.35]) by theia.denx.de (Postfix) with ESMTPS id 0DEE528108 for ; Wed, 27 Oct 2010 11:35:52 +0200 (CEST) X-ASG-Debug-ID: 1288172151-081c33f40001-4l7tJC Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id 4cVzlNkA9GywYtWb for ; Wed, 27 Oct 2010 02:35:51 -0700 (PDT) X-Barracuda-Envelope-From: prafulla@localhost.localdomain Received: from localhost.localdomain (unknown [10.31.130.148]) by maili.marvell.com (Postfix) with ESMTP id EF3A68A001; Wed, 27 Oct 2010 02:35:50 -0700 (PDT) Received: from localhost.localdomain (pe-dt061 [127.0.0.1]) by localhost.localdomain (8.14.1/8.14.1) with ESMTP id o9RDrS9A003394; Wed, 27 Oct 2010 19:23:29 +0530 Received: (from prafulla@localhost) by localhost.localdomain (8.14.1/8.14.1/Submit) id o9RDrR4C003393; Wed, 27 Oct 2010 19:23:27 +0530 From: Prafulla Wadaskar To: u-boot@lists.denx.de X-ASG-Orig-Subj: [PATCH 2/5] Serial: Add UART support for Marvell ARMADA 100 SoCs. Date: Wed, 27 Oct 2010 19:23:21 +0530 X-ASG-Orig-Subj: [PATCH 2/5] Serial: Add UART support for Marvell ARMADA 100 SoCs. Message-Id: <1288187604-3371-3-git-send-email-prafulla@marvell.com> X-Mailer: git-send-email 1.5.3.3 In-Reply-To: <1288187604-3371-2-git-send-email-prafulla@marvell.com> References: <1288187604-3371-1-git-send-email-prafulla@marvell.com> <1288187604-3371-2-git-send-email-prafulla@marvell.com> X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1288172151 X-Barracuda-URL: http://10.68.76.222:80/cgi-mod/mark.cgi X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 Cc: Manas Saksena , Lei Wen , Yu Tang , Eric Miao , Ashish Karkare , Kiran Vedere , Prabhanjan Sarnaik Subject: [U-Boot] [PATCH 2/5] Serial: Add UART support for Marvell ARMADA 100 SoCs. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net From: Prafulla WADASKAR ARMADA 100 SoCs has NS16550 compatible UART peripheral This patch enables the same for ARMADA100 platforms Signed-off-by: Mahavir Jain Signed-off-by: Prafulla WADASKAR --- 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 #endif +#ifdef CONFIG_ARMADA100 +#include +#endif #if defined (CONFIG_SERIAL_MULTI) #include