From patchwork Thu Mar 21 19:03:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: man.huber@arcor.de X-Patchwork-Id: 229813 X-Patchwork-Delegate: trini@ti.com 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 A04A02C00BB for ; Fri, 22 Mar 2013 06:04:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9C8524A01F; Thu, 21 Mar 2013 20:04:25 +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 nzAE3Eew4eeU; Thu, 21 Mar 2013 20:04:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 470344A021; Thu, 21 Mar 2013 20:04:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 581DF4A021 for ; Thu, 21 Mar 2013 20:04:17 +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 D7JOj54uJ2Vw for ; Thu, 21 Mar 2013 20:04:07 +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 mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by theia.denx.de (Postfix) with ESMTPS id 83E094A01F for ; Thu, 21 Mar 2013 20:04:06 +0100 (CET) Received: from mail-in-01-z2.arcor-online.net (mail-in-01-z2.arcor-online.net [151.189.8.13]) by mx.arcor.de (Postfix) with ESMTP id 7BE4AA9CF3; Thu, 21 Mar 2013 20:04:05 +0100 (CET) Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 770707DA6D8; Thu, 21 Mar 2013 20:04:05 +0100 (CET) X-Greylist: Passed host: 88.65.41.105 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-10.arcor-online.net 1C1F12D6298 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1363892645; bh=id1IzlfWwORfTRz90x4vnTaiRIHg5MnSgiDp/kJIpIk=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=fWZocawl4MsqCFqBIV5otphzo6iSQ5pJtihCnsjVxUoF1T0EH2WekjC0X7mCz4ntz pD37R77HePnQO/UE9DDaq2Nlt7+pqNzA+RKokGhdFSSBSGxisZNNMq4Ce2qSppx5o5 GooRD6Kdx8+pl/tFu5SO9XeOju8bWP4Tmzt0RbhU= X-Greylist: Passed host: 88.65.41.105 X-Greylist: Passed host: 88.65.41.105 Received: from [192.168.2.103] (dslb-088-065-041-105.pools.arcor-ip.net [88.65.41.105]) (Authenticated sender: man.huber@arcor.de) by mail-in-10.arcor-online.net (Postfix) with ESMTPA id 1C1F12D6298; Thu, 21 Mar 2013 20:04:05 +0100 (CET) Message-ID: <514B599F.8040804@arcor.de> Date: Thu, 21 Mar 2013 20:03:59 +0100 From: Manfred Huber User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: u-boot@lists.denx.de References: <1679653192.50708.1361970554739.JavaMail.ngmail@webmail21.arcor-online.net> <51447012.6010303@arcor.de> <20130319144957.GF25919@bill-the-cat> In-Reply-To: Cc: Tom Rini Subject: [U-Boot] [PATCH] omap3_beagle: Enable CONFIG_SYS_NS16550_BROKEN_TEMT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Manfred Huber Beagleboard UART (ns16550) doesn't set the Transmitter Empty (TEMT) Bit in SPL. Only Transmitter Hold Register Empty (THRE) Bit is set. This makes SPL to hang while waiting for TEMT. Adding the CONFIG_SYS_NS16550_BROKEN_TEMT config option and waiting for THRE avoid this issue. Signed-off-by: Manfred Huber --- drivers/serial/ns16550.c | 5 ++++- include/configs/omap3_beagle.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index b2da8b3..6379bcc 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -36,7 +36,10 @@ void NS16550_init(NS16550_t com_port, int baud_divisor) { -#if (!defined(CONFIG_SYS_NS16550_BROKEN_TEMT)) +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYS_NS16550_BROKEN_TEMT) + while (!(serial_in(&com_port->lsr) & UART_LSR_THRE)) + ; +#else while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT)) ; #endif diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 48ce4c0..6ab46d5 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -82,6 +82,9 @@ #define CONFIG_SYS_NS16550_REG_SIZE (-4) #define CONFIG_SYS_NS16550_CLK V_NS16550_CLK +/* define to avoid U-Boot to hang while waiting for TEMT */ +#define CONFIG_SYS_NS16550_BROKEN_TEMT + /* * select serial console configuration */