Commit 6e60c148 authored by Roel Kluin's avatar Roel Kluin Committed by Michal Simek

microblaze: iowrite upon timeout

retries reaches -1, so the iowrite occurrs upon timeout.
Acked-by: default avatarJohn Williams <john.williams@petalogix.com>
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent 04e3a553
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment