linux-mips
[Top] [All Lists]

Re: [PATCH 06/12] MIPS: Netlogic: early console fix

To: linux-mips@linux-mips.org
Subject: Re: [PATCH 06/12] MIPS: Netlogic: early console fix
From: Florian Fainelli <florian@openwrt.org>
Date: Fri, 13 Jul 2012 18:27:07 +0200
Cc: Jayachandran C <jayachandranc@netlogicmicro.com>, ralf@linux-mips.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=ud6MvCWpfZnqLNmei4I2J1EUEYzFmj12TdTXOwU9jnY=; b=eU/180dLXqELSzX/F87ZGTUYH1Q6KItr4I24JTO28psvYA5bY/mSPnRNOsFOj7r135 aQUfVOLMWCgccDCLU0hclx057gqbjfN70LVjLY0b2O4lyl7t7vGHli1HVDTLGo78lZn+ wSBoVk74YLY/T6Jbt0t/1lXJchPbK5C/2Fu5p7Lb28Ay2sTgsDOzn52hLgfZid3mFd9Y qhkLIMWI8pmLjCRzOgVWMDbVKNqJx2UOMMgACRKyh5u8PIdWLeOhzX+sZ3Nkp/7uOlNs 4hv4877m1T7TjJoBf+39sUmfH+UVXTwEes6Px8hhhl+BIB5QAtjFWcTaNGUIMf6JLJPm EcoA==
In-reply-to: <1342196605-4260-7-git-send-email-jayachandranc@netlogicmicro.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Organization: OpenWrt
References: <1342196605-4260-1-git-send-email-jayachandranc@netlogicmicro.com> <1342196605-4260-7-git-send-email-jayachandranc@netlogicmicro.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: KMail/4.8.4 (Linux/3.2.0-24-generic; KDE/4.8.4; x86_64; ; )
On Friday 13 July 2012 21:53:19 Jayachandran C wrote:
> In prom_putchar(), wait for just the TX empty bit to clear in the
> UART LSR.
> 
> Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
> ---
>  arch/mips/netlogic/common/earlycons.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/netlogic/common/earlycons.c 
b/arch/mips/netlogic/common/earlycons.c
> index f193f7b..53b200a5 100644
> --- a/arch/mips/netlogic/common/earlycons.c
> +++ b/arch/mips/netlogic/common/earlycons.c
> @@ -54,7 +54,7 @@ void prom_putchar(char c)
>  #elif defined(CONFIG_CPU_XLR)
>       uartbase = nlm_mmio_base(NETLOGIC_IO_UART_0_OFFSET);
>  #endif
> -     while (nlm_read_reg(uartbase, UART_LSR) == 0)
> +     while ((nlm_read_reg(uartbase, UART_LSR) & 0x20) == 0)
>               ;

You could use use UART_LSR_THRE here instead of 0x20.
--
Florian

<Prev in Thread] Current Thread [Next in Thread>