diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-10-04 17:44:54 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2007-10-10 11:14:35 -0400 |
commit | 17c5c2093624e81acda16fb737e4679750addd7a (patch) | |
tree | 9784a5f04215fa1ffbbf42d5fdd785a046c8bd18 /arch/powerpc/boot | |
parent | 4c3d514d7e5b394d1df76201aada8956c9605882 (diff) |
[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever
Fixes inverted logic in uartlite_getc
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/uartlite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/boot/uartlite.c b/arch/powerpc/boot/uartlite.c index 38a470b329e3..46bed69b4169 100644 --- a/arch/powerpc/boot/uartlite.c +++ b/arch/powerpc/boot/uartlite.c | |||
@@ -45,8 +45,8 @@ static void uartlite_putc(unsigned char c) | |||
45 | 45 | ||
46 | static unsigned char uartlite_getc(void) | 46 | static unsigned char uartlite_getc(void) |
47 | { | 47 | { |
48 | u32 reg = ULITE_STATUS_RXVALID; | 48 | u32 reg = 0; |
49 | while (reg & ULITE_STATUS_RXVALID) /* spin on RXVALID bit */ | 49 | while (!(reg & ULITE_STATUS_RXVALID)) /* spin waiting for RXVALID bit */ |
50 | reg = in_be32(reg_base + ULITE_STATUS); | 50 | reg = in_be32(reg_base + ULITE_STATUS); |
51 | return in_be32(reg_base + ULITE_RX); | 51 | return in_be32(reg_base + ULITE_RX); |
52 | } | 52 | } |