[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever

Fixes inverted logic in uartlite_getc

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Grant Likely 2007-10-04 15:44:54 -06:00
Родитель 4c3d514d7e
Коммит 17c5c20936
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -45,8 +45,8 @@ static void uartlite_putc(unsigned char c)
static unsigned char uartlite_getc(void) static unsigned char uartlite_getc(void)
{ {
u32 reg = ULITE_STATUS_RXVALID; u32 reg = 0;
while (reg & ULITE_STATUS_RXVALID) /* spin on RXVALID bit */ while (!(reg & ULITE_STATUS_RXVALID)) /* spin waiting for RXVALID bit */
reg = in_be32(reg_base + ULITE_STATUS); reg = in_be32(reg_base + ULITE_STATUS);
return in_be32(reg_base + ULITE_RX); return in_be32(reg_base + ULITE_RX);
} }