[U-Boot] [PATCH] serial, ns16550: bugfix: ns16550 fifo not enabled

Heiko Schocher
2017-01-11T05:38:22Z

Hello Tom,

Am 10.01.2017 um 17:40 schrieb Tom Rini:
> 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
>>
>> This patch fixes only:
>> ./arch/arm/mach-omap2/am33xx/board.c
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>
> Good find! I didn't catch this in my setups as nothing in test.py is
> currently long enough to trigger this apparently (I have both an am335x
> evm and a beagleboard in my setup). By inspection, the right fix for
> all platforms would be to put the old default value in as this is what
> was missed in the original patch from Marek.

The problems are boards/archs, which create "struct ns16550_platdata"
on their own ... I added the original value for fcr in
./arch/arm/mach-omap2/am33xx/board.c

Do you mean, I should grep for all this places and
fix them in my patch (without having the chance to test it) ?

Ok, seems a valid solution ... I try to do this today.

bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany