[U-Boot] [PATCH 1/2] arm: vf610: lpuart: fix status register handling
Stefano Babic
sbabic at denx.de
Tue Sep 9 16:53:48 CEST 2014
On 19/08/2014 17:54, Stefan Agner wrote:
> The status register 1 (S1) is not writeable, hence we should not
> write it. In order to clear the RDRF flag we only need to read
> the data register.
>
> Also, when stressing U-Boot a lot with serial input, an overflow can
> occur which asserts the S1_OR flag (while not asserting the S1_RDRF
> flag). To clear this flag we again just need to read the data
> register, hence add this flag to the abort conditions for the while
> loop.
>
> Insert a compiler barrier to make sure reading the data register
> gets executed after reading the status register.
>
> Signed-off-by: Stefan Agner <stefan at agner.ch>
> ---
Applied to u-boot-imx, thanks!
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list