From patchwork Tue Dec 7 17:06:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prafulla Wadaskar X-Patchwork-Id: 74533 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 895B6B708B for ; Tue, 7 Dec 2010 23:55:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E42AA280E8; Tue, 7 Dec 2010 13:55:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 9ogSmwVZd1v0; Tue, 7 Dec 2010 13:55:16 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2AB6E28105; Tue, 7 Dec 2010 13:55:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C212B280E9 for ; Tue, 7 Dec 2010 13:54:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 CcUNHgBkZetJ for ; Tue, 7 Dec 2010 13:54:58 +0100 (CET) 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 25C55280E7 for ; Tue, 7 Dec 2010 13:54:58 +0100 (CET) X-ASG-Debug-ID: 1291726496-081b009f0001-4l7tJC Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id VVAbz1JKvVThG5Fe; Tue, 07 Dec 2010 04:54:56 -0800 (PST) X-Barracuda-Envelope-From: prafulla@localhost.localdomain Received: from localhost.localdomain (unknown [10.31.130.148]) by maili.marvell.com (Postfix) with ESMTP id 35D2C8A008; Tue, 7 Dec 2010 04:54:55 -0800 (PST) Received: from localhost.localdomain (pe-dt061 [127.0.0.1]) by localhost.localdomain (8.14.1/8.14.1) with ESMTP id oB7H6bRM012511; Tue, 7 Dec 2010 22:36:38 +0530 Received: (from prafulla@localhost) by localhost.localdomain (8.14.1/8.14.1/Submit) id oB7H6aWi012510; Tue, 7 Dec 2010 22:36:36 +0530 From: Prafulla Wadaskar To: u-boot@lists.denx.de X-ASG-Orig-Subj: [PATCH v4 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro Date: Tue, 7 Dec 2010 22:36:23 +0530 X-ASG-Orig-Subj: [PATCH v4 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro Message-Id: <1291741587-12484-4-git-send-email-prafulla@marvell.com> X-Mailer: git-send-email 1.5.3.4 In-Reply-To: <1291741587-12484-3-git-send-email-prafulla@marvell.com> References: <1291741587-12484-1-git-send-email-prafulla@marvell.com> <1291741587-12484-2-git-send-email-prafulla@marvell.com> <1291741587-12484-3-git-send-email-prafulla@marvell.com> X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1291726496 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: Eric Miao , Manas Saksena , Lei Wen , Yu Tang , Ashish Karkare , Kiran Vedere , Prabhanjan Sarnaik Subject: [U-Boot] [PATCH v4 4/7] Serial: ns16550: Add support for CONFIG_SYS_NS16550_IER macro 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 On some processors this ier register configuration is different for ex. Marvell Armada100 This patch introduce CONFIG_SYS_NS16550_IER macro support to unconditionally initialize this register. Signed-off-by: Prafulla Wadaskar --- Changelog v3: macro defination CONFIG_SYS_NS16550_IER moved from ns16550.h to ns16550.c drivers/serial/ns16550.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 32f24de..8eeb48f 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -24,9 +24,13 @@ #define serial_in(y) readb(y) #endif +#ifndef CONFIG_SYS_NS16550_IER +#define CONFIG_SYS_NS16550_IER 0x00 +#endif /* CONFIG_SYS_NS16550_IER */ + void NS16550_init (NS16550_t com_port, int baud_divisor) { - serial_out(0x00, &com_port->ier); + serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2) serial_out(0x7, &com_port->mdr1); /* mode select reset TL16C750*/ #endif @@ -52,7 +56,7 @@ 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) { - serial_out(0x00, &com_port->ier); + serial_out(CONFIG_SYS_NS16550_IER, &com_port->ier); serial_out(UART_LCR_BKSE | UART_LCRVAL, &com_port->lcr); serial_out(0, &com_port->dll); serial_out(0, &com_port->dlm);