Skip to content

Commit

Permalink
[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever
Browse files Browse the repository at this point in the history
Fixes inverted logic in uartlite_getc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Grant Likely committed Oct 10, 2007
1 parent 4c3d514 commit 17c5c20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/powerpc/boot/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 17c5c20

Please sign in to comment.