microblaze: iowrite upon timeout

retries reaches -1, so the iowrite occurrs upon timeout.

Acked-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
Roel Kluin 2009-04-16 22:49:17 +02:00 committed by Michal Simek
parent 04e3a553e0
commit 6e60c14810
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ static void early_printk_putc(char c)
unsigned retries = 10000;
/* read status bit - 0x8 offset */
while (retries-- && (in_be32(base_addr + 8) & (1 << 3)))
while (--retries && (in_be32(base_addr + 8) & (1 << 3)))
;
/* Only attempt the iowrite if we didn't timeout */