]> git.baikalelectronics.ru Git - kernel.git/commitdiff
[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever
authorGrant Likely <grant.likely@secretlab.ca>
Thu, 4 Oct 2007 21:44:54 +0000 (15:44 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 10 Oct 2007 15:14:35 +0000 (09:14 -0600)
Fixes inverted logic in uartlite_getc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
arch/powerpc/boot/uartlite.c

index 38a470b329e30687817cf6f9769a6959624f5e2a..46bed69b416938477a0be06e14051cacf8427694 100644 (file)
@@ -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);
 }