lkml.org 
[lkml]   [2009]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] microblaze: iowrite upon timeout
retries reaches -1, so the iowrite occurrs upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c
index 62cc789..4b0f0fd 100644
--- a/arch/microblaze/kernel/early_printk.c
+++ b/arch/microblaze/kernel/early_printk.c
@@ -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 */

\
 
 \ /
  Last update: 2009-04-16 22:51    [W:0.047 / U:1.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site