diff mbox

[U-Boot,09/11] powerpc/ppc4xx: Increase timeout for gdsys mclink bus startup

Message ID 1366629372-32022-10-git-send-email-eibach@gdsys.de
State Superseded
Delegated to: Stefan Roese
Headers show

Commit Message

Dirk Eibach April 22, 2013, 11:16 a.m. UTC
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
---
 board/gdsys/common/mclink.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/board/gdsys/common/mclink.c b/board/gdsys/common/mclink.c
index 6c86145..641a327 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++;
 	}