summaryrefslogtreecommitdiff
path: root/src/soc/broadcom/cygnus
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/broadcom/cygnus')
-rw-r--r--src/soc/broadcom/cygnus/ns16550.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/soc/broadcom/cygnus/ns16550.c b/src/soc/broadcom/cygnus/ns16550.c
index 71a4cb08ef..aa9dd2d818 100644
--- a/src/soc/broadcom/cygnus/ns16550.c
+++ b/src/soc/broadcom/cygnus/ns16550.c
@@ -84,8 +84,10 @@ static int ns16550_tst_byte(void)
static unsigned char ns16550_rx_byte(void)
{
unsigned long int i = SINGLE_CHAR_TIMEOUT;
- while (i-- && !ns16550_tst_byte())
+ while (i && !ns16550_tst_byte()) {
udelay(1);
+ i--;
+ }
if (i)
return read32(&regs->rbr);
else