Skip to content

Commit

Permalink
microblaze: iowrite upon timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Michal Simek committed Apr 23, 2009
1 parent 04e3a55 commit 6e60c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6e60c14

Please sign in to comment.