提交 6e60c148 编写于 作者: R Roel Kluin 提交者: Michal Simek

microblaze: iowrite upon timeout

retries reaches -1, so the iowrite occurrs upon timeout.
Acked-by: NJohn Williams <john.williams@petalogix.com>
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NMichal Simek <monstr@monstr.eu>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册