aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com>2012-09-07 08:19:20 -0600
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2012-09-07 08:23:37 -0600
commit20a79baeae9e167f2c3dd775700eca88ded8feee (patch)
tree0ca09960f10b40deb810fbb3bf1472eb9708174f
parent63c05c1fa9b737055dfd6503d07e79e9c58e1d0b (diff)
snowball: Clear UART RX FIFO
Clear any data in UART RXFIFO, which interrupts autoboot progress without user keypress. Signed-off-by: ramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com>
-rw-r--r--board/st-ericsson/snowball/snowball.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/board/st-ericsson/snowball/snowball.c b/board/st-ericsson/snowball/snowball.c
index 8c743c0ad..f56a8ac86 100644
--- a/board/st-ericsson/snowball/snowball.c
+++ b/board/st-ericsson/snowball/snowball.c
@@ -253,6 +253,14 @@ int board_late_init(void)
if ((raise_ab8500_gpio16() < 0))
printf("error: cant' raise GPIO16\n");
+ /* Without usb-serial cable plugged at this
+ * stage, some garbage is seen in RX FIFO
+ * So, make sure we empty UART RX FIFO before
+ * we proceed further
+ */
+ while (tstc())
+ (void) getc();
+
return 0;
}