Skip to contentSkip to conversation

microblaze: iowrite upon timeout

PATCH In review Roel Kluin 2 participants 2 messages Apr 16, 2009 – Apr 21, 2009 Microblaze architecture

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 microblaze: iowrite upon timeout

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

---

arch/microblaze/kernel/early_printk.c +1 -1
index 62cc789..4b0f0fd 100644
@@ -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 */
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Roel Kluin

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

(also applied to PetaLogix SVN)

Thanks,

John

Quoted 21 lines

---

arch/microblaze/kernel/early_printk.c +1 -1
index 62cc789..4b0f0fd 100644
@@ -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 */

___________________________
microblaze-uclinux mailing list
[email protected]
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/

Signature · 3 lines
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com  p: +61-7-30090663  f: +61-7-30090663