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

Dirk Eibach eibach at gdsys.de
Mon Apr 22 13:16:10 CEST 2013


Signed-off-by: Dirk Eibach <eibach at gdsys.de>
---
 board/gdsys/common/mclink.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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++;
 	}
 
-- 
1.7.10.4




More information about the U-Boot mailing list