summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2007-10-04 23:44:54 +0200
committerGrant Likely <grant.likely@secretlab.ca>2007-10-10 17:14:35 +0200
commit17c5c2093624e81acda16fb737e4679750addd7a (patch)
tree9784a5f04215fa1ffbbf42d5fdd785a046c8bd18
parent[POWERPC] Don't build arch/powerpc/sysdev/dcr.c for ARCH=ppc kernels (diff)
downloadlinux-17c5c2093624e81acda16fb737e4679750addd7a.tar.xz
linux-17c5c2093624e81acda16fb737e4679750addd7a.zip
[POWERPC] Uartlite: bootwrapper bug fix, getc loops forever
Fixes inverted logic in uartlite_getc Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r--arch/powerpc/boot/uartlite.c4
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)
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);
}