diff mbox

[U-Boot,v2,08/10] powerpc/ppc4xx: Increase timeout for gdsys mclink bus startup

Message ID 1367847325-21463-9-git-send-email-dirk.eibach@gdsys.cc
State Changes Requested
Delegated to: Wolfgang Denk
Headers show

Commit Message

Dirk Eibach May 6, 2013, 1:35 p.m. UTC
From: Dirk Eibach <eibach@gdsys.de>

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
---
Changes in v2: None

 board/gdsys/common/mclink.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/board/gdsys/common/mclink.c b/board/gdsys/common/mclink.c
index 9a4f3e9..d2983bb 100644
--- a/board/gdsys/common/mclink.c
+++ b/board/gdsys/common/mclink.c
@@ -40,11 +40,11 @@  enum {
 int mclink_probe(void)
 {
 	unsigned int k;
-	unsigned int ctr = 0;
 	int slaves = 0;
 
 	for (k = 0; k < CONFIG_SYS_MCLINK_MAX; ++k) {
 		int timeout = 0;
+		unsigned int ctr = 0;
 
 		if (!(fpga_get_reg(k, REG(mc_status)) & (1 << 15)))
 			break;
@@ -53,7 +53,7 @@  int mclink_probe(void)
 
 		while (!(fpga_get_reg(k, REG(mc_status)) & (1 << 14))) {
 			udelay(100);
-			if (ctr++ > 3) {
+			if (ctr++ > 500) {
 				timeout = 1;
 				break;
 			}
@@ -61,6 +61,8 @@  int mclink_probe(void)
 		if (timeout)
 			break;
 
+		printf("waited %d us for mclink %d to come up\n", ctr * 100, k);
+
 		slaves++;
 	}