From patchwork Tue Jan 10 11:50:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 713230 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 3tyVhS5nw9z9sCX for ; Tue, 10 Jan 2017 22:50:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 927BBB38D0; Tue, 10 Jan 2017 12:50:30 +0100 (CET) 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 IlkkiIn64T8J; Tue, 10 Jan 2017 12:50:30 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F10EB389A; Tue, 10 Jan 2017 12:50:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E543A7616 for ; Tue, 10 Jan 2017 12:50:26 +0100 (CET) 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 RmYGP9EtaFPW for ; Tue, 10 Jan 2017 12:50:26 +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 cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by theia.denx.de (Postfix) with ESMTP id 15C3FA760C for ; Tue, 10 Jan 2017 12:50:22 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992240AbdAJLuWRVshV (ORCPT ); Tue, 10 Jan 2017 12:50:22 +0100 Date: Tue, 10 Jan 2017 12:50:21 +0100 From: Ladislav Michl To: Heiko Schocher Message-ID: <20170110115021.7ck7yffwdhvq3vz4@lenoch> References: <1484032131-32540-1-git-send-email-hs@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1484032131-32540-1-git-send-email-hs@denx.de> User-Agent: NeoMutt/20161126 (1.7.1) Cc: Marek Vasut , Albert Aribaud , Stephen Warren , Tom Rini , U-Boot Mailing List Subject: Re: [U-Boot] [PATCH] serial, ns16550: bugfix: ns16550 fifo not enabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hi Heiko, On Tue, Jan 10, 2017 at 08:08:51AM +0100, Heiko Schocher wrote: > commit: 65f83802b7a5b "serial: 16550: Add getfcr accessor" > breaks u-boot commandline working with long commands > sending to the board. > > Since the above patch, you have to setup the fcr register. > > For board/archs which enable OF_PLATDATA, the new field > fcr in struct ns16550_platdata is not filled with a > default value ... > > This leads in not setting up the uarts fifo, which ends > in problems, when you send long commands to u-boots > commandline. > > Detected this issue with automated tbot tests on am335x > based shc board. > > The error does not popup, if you type commands. You need > to copy&paste a long command to u-boots commandshell > (or send a long command with tbot) > > Possible boards/plattforms with problems: > ./arch/arm/cpu/arm926ejs/lpc32xx/devices.c > ./arch/arm/mach-tegra/board.c > ./board/isee/igep00x0/igep00x0.c > ./board/overo/overo.c > ./board/quipos/cairo/cairo.c > ./board/logicpd/omap3som/omap3logic.c > ./board/logicpd/zoom1/zoom1.c > ./board/timll/devkit8000/devkit8000.c > ./board/lg/sniper/sniper.c > ./board/ti/beagle/beagle.c > ./drivers/serial/serial_rockchip.c Quick test shows igep00x0 also suffers from this issue. Are you going to collect fixes and apply them as one patch or shall I sent a separate patch? Anyway, here's fix for igep00x0: Signed-off-by: Ladislav Michl > This patch fixes only: > ./arch/arm/mach-omap2/am33xx/board.c > > Signed-off-by: Heiko Schocher > --- > > arch/arm/mach-omap2/am33xx/board.c | 23 +++++++++++++++++------ > 1 file changed, 17 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c > index 581c0ab..a0ce62c 100644 > --- a/arch/arm/mach-omap2/am33xx/board.c > +++ b/arch/arm/mach-omap2/am33xx/board.c > @@ -39,15 +39,26 @@ > DECLARE_GLOBAL_DATA_PTR; > > #if !CONFIG_IS_ENABLED(OF_CONTROL) > +/* Clear & enable FIFOs */ > +#define UART_FCRVAL (UART_FCR_FIFO_EN | \ > + UART_FCR_RXSR | \ > + UART_FCR_TXSR) > + > static const struct ns16550_platdata am33xx_serial[] = { > - { .base = CONFIG_SYS_NS16550_COM1, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > + { .base = CONFIG_SYS_NS16550_COM1, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > # ifdef CONFIG_SYS_NS16550_COM2 > - { .base = CONFIG_SYS_NS16550_COM2, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > + { .base = CONFIG_SYS_NS16550_COM2, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > # ifdef CONFIG_SYS_NS16550_COM3 > - { .base = CONFIG_SYS_NS16550_COM3, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > - { .base = CONFIG_SYS_NS16550_COM4, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > - { .base = CONFIG_SYS_NS16550_COM5, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > - { .base = CONFIG_SYS_NS16550_COM6, .reg_shift = 2, .clock = CONFIG_SYS_NS16550_CLK }, > + { .base = CONFIG_SYS_NS16550_COM3, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > + { .base = CONFIG_SYS_NS16550_COM4, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > + { .base = CONFIG_SYS_NS16550_COM5, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > + { .base = CONFIG_SYS_NS16550_COM6, .reg_shift = 2, > + .clock = CONFIG_SYS_NS16550_CLK, .fcr = UART_FCRVAL }, > # endif > # endif > }; > -- > 2.7.4 diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index ae7959b1eb..8bea199a44 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -32,7 +32,8 @@ DECLARE_GLOBAL_DATA_PTR; static const struct ns16550_platdata igep_serial = { .base = OMAP34XX_UART3, .reg_shift = 2, - .clock = V_NS16550_CLK + .clock = V_NS16550_CLK, + .fcr = UART_FCR_FIFO_EN | UART_FCR_RXSR | UART_FCR_TXSR, }; U_BOOT_DEVICE(igep_uart) = {