From: Grant Likely Date: Thu, 4 Oct 2007 21:44:54 +0000 (-0600) Subject: [POWERPC] Uartlite: bootwrapper bug fix, getc loops forever X-Git-Tag: v2.6.24-rc1~1450^2~14^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=17c5c2093624e81acda16fb737e4679750addd7a;p=linux-2.6-omap-h63xx.git [POWERPC] Uartlite: bootwrapper bug fix, getc loops forever Fixes inverted logic in uartlite_getc Signed-off-by: Grant Likely --- diff --git a/arch/powerpc/boot/uartlite.c b/arch/powerpc/boot/uartlite.c index 38a470b329e..46bed69b416 100644 --- a/arch/powerpc/boot/uartlite.c +++ b/arch/powerpc/boot/uartlite.c @@ -45,8 +45,8 @@ static void uartlite_putc(unsigned char c) static unsigned char uartlite_getc(void) { - u32 reg = ULITE_STATUS_RXVALID; - while (reg & ULITE_STATUS_RXVALID) /* spin on RXVALID bit */ + u32 reg = 0; + while (!(reg & ULITE_STATUS_RXVALID)) /* spin waiting for RXVALID bit */ reg = in_be32(reg_base + ULITE_STATUS); return in_be32(reg_base + ULITE_RX); }