From patchwork Fri Sep 14 06:17:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot] snowball: Clear UART RX FIFO From: Ramesh Chandrasekaran X-Patchwork-Id: 183818 Message-Id: <1347603445-29523-1-git-send-email-ramesh.chandrasekaran@stericsson.com> To: Cc: Anmar Oueja , Jayeeta BANDYOPADHYAY Date: Fri, 14 Sep 2012 11:47:25 +0530 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 --- 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; }