Patchwork [U-Boot] snowball: Clear UART RX FIFO

login
register
mail settings
Submitter Ramesh Chandrasekaran
Date Sept. 14, 2012, 6:17 a.m.
Message ID <1347603445-29523-1-git-send-email-ramesh.chandrasekaran@stericsson.com>
Download mbox | patch
Permalink /patch/183818/
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Comments

Ramesh Chandrasekaran - Sept. 14, 2012, 6:17 a.m.
Without usb-serial cable plugged at this stage, some
garbage is seen in UART RX FIFO, which blocks autoboot
progress. The fix makes sure to empty the RX FIFO,
before we wait for user input to interrupt autoboot.

Signed-off-by: Ramesh Chandrasekaran <ramesh.chandrasekaran@stericsson.com>
---
 board/st-ericsson/snowball/snowball.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Ramesh Chandrasekaran - Sept. 27, 2012, 7:07 a.m.
> Without usb-serial cable plugged at this stage, some garbage is seen in UART
> RX FIFO, which blocks autoboot progress. The fix makes sure to empty the RX
> FIFO, before we wait for user input to interrupt autoboot.
> 
> Signed-off-by: Ramesh Chandrasekaran
> <ramesh.chandrasekaran@stericsson.com>
> ---
>  board/st-ericsson/snowball/snowball.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/board/st-ericsson/snowball/snowball.c b/board/st-
> ericsson/snowball/snowball.c
> index 8c743c0..e750df1 100644
> --- a/board/st-ericsson/snowball/snowball.c
> +++ b/board/st-ericsson/snowball/snowball.c
> @@ -253,6 +253,10 @@ int board_late_init(void)
>  	if ((raise_ab8500_gpio16() < 0))
>  		printf("error: cant' raise GPIO16\n");
> 
> +	/* empty UART RX FIFO */
> +	while (tstc())
> +		(void) getc();
> +
>  	return 0;
>  }
> 
> --
Hi Albert Aribaud,

Is the above patch going in for the release ?
Not got any review comments until now from the community.
Or please point me to the right person.

Ramesh

Patch

diff --git a/board/st-ericsson/snowball/snowball.c b/board/st-ericsson/snowball/snowball.c
index 8c743c0..e750df1 100644
--- a/board/st-ericsson/snowball/snowball.c
+++ b/board/st-ericsson/snowball/snowball.c
@@ -253,6 +253,10 @@  int board_late_init(void)
 	if ((raise_ab8500_gpio16() < 0))
 		printf("error: cant' raise GPIO16\n");
 
+	/* empty UART RX FIFO */
+	while (tstc())
+		(void) getc();
+
 	return 0;
 }