summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRamesh Chandrasekaran <ramesh.chandrasekaran@stericsson.com>2012-09-10 20:28:27 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-10-04 16:59:13 +0200
commit1acc5559d9c3f45b4243474fe61ec3cab8d23f7a (patch)
treeebeb304fa60ddf02ae816e763d3fab2c462ba71a /board
parentf22651cfc422a51253f2d475343373f82cf7f929 (diff)
downloadu-boot-imx-1acc5559d9c3f45b4243474fe61ec3cab8d23f7a.zip
u-boot-imx-1acc5559d9c3f45b4243474fe61ec3cab8d23f7a.tar.gz
u-boot-imx-1acc5559d9c3f45b4243474fe61ec3cab8d23f7a.tar.bz2
snowball: Clear UART RX FIFO
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>
Diffstat (limited to 'board')
-rw-r--r--board/st-ericsson/snowball/snowball.c4
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;
}