Commit b28dbc2e1c7e08e0472ce2fece666eb0cab9e753

Denis Ahrens 2012-11-26T02:38:20

ztex: Harmonize low-speed FPGA configuration code with high-speed code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/libztex.c b/libztex.c
index 9a8b11c..f9fefed 100644
--- a/libztex.c
+++ b/libztex.c
@@ -306,11 +306,13 @@ static int libztex_configureFpgaLS(struct libztex_device *ztex, const char* firm
 
 		fclose(fp);
 	}
+
 	libztex_getFpgaState(ztex, &state);
 	if (!state.fpgaConfigured) {
-		applog(LOG_ERR, "%s: FPGA configuration failed: DONE pin does not go high", ztex->repr);
-		return 3;
+		applog(LOG_ERR, "%s: LS FPGA configuration failed: DONE pin does not go high", ztex->repr);
+		return -3;
 	}
+
 	nmsleep(200);
 	applog(LOG_INFO, "%s: FPGA configuration done", ztex->repr);
 	return 0;