[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-368-gd79da81
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2013-08-09 15:56:35
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via d79da81bcafc3808681495b4369acae09f07f940 (commit)
from 638cfbde73437a8e579ce7d1baabdcbc1f27d68c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d79da81bcafc3808681495b4369acae09f07f940
Author: Eric Jarrige <eri...@ar...>
Date: Fri Aug 9 18:05:32 2013 +0200
[UBOOT] spartan: Fix FPGA download issue when firmware is not valid - also add user inerface to stop download using ctrl-c
-----------------------------------------------------------------------
Summary of changes:
patches/u-boot/2013.04/320-spartan.patch | 68 ++++++++++++++++++++----------
1 files changed, 46 insertions(+), 22 deletions(-)
diff --git a/patches/u-boot/2013.04/320-spartan.patch b/patches/u-boot/2013.04/320-spartan.patch
index 8659bf5..5a58b73 100644
--- a/patches/u-boot/2013.04/320-spartan.patch
+++ b/patches/u-boot/2013.04/320-spartan.patch
@@ -11,37 +11,61 @@ diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c
index 1633a70..9ca0522 100644
--- a/drivers/fpga/spartan3.c
+++ b/drivers/fpga/spartan3.c
-@@ -188,7 +188,7 @@ static int Spartan3_sp_load(Xilinx_desc *desc, const void *buf, size_t bsize)
- (*fn->clk) (TRUE, TRUE, cookie); /* Assert the clock pin */
+@@ -188,8 +188,14 @@ static int Spartan3_sp_load(Xilinx_desc
+ (*fn->clk) (true, true, cookie); /* Assert the clock pin */
/* Load the data */
- while (bytecount < bsize) {
-+ while ( (*fn->done) (cookie) == FPGA_FAIL){
- /* XXX - do we check for an Ctrl-C press in here ??? */
+- /* XXX - do we check for an Ctrl-C press in here ??? */
++ while ( ((*fn->done) (cookie) != FPGA_SUCCESS)
++ && (bytecount < bsize)) {
++#ifdef CONFIG_SYS_FPGA_CHECK_CTRLC
++ if (ctrlc ()) {
++ (*fn->abort) (cookie);
++ return FPGA_FAIL;
++ }
++#endif
/* XXX - Check the error bit? */
-@@ -198,8 +198,8 @@ static int Spartan3_sp_load(Xilinx_desc *desc, const void *buf, size_t bsize)
- CONFIG_FPGA_DELAY ();
- (*fn->clk) (TRUE, TRUE, cookie); /* Assert the clock pin */
+ (*fn->wdata) (data[bytecount++], true, cookie); /* write the data */
+@@ -288,7 +294,12 @@ static int Spartan3_sp_dump(Xilinx_desc
--#ifdef CONFIG_SYS_FPGA_CHECK_BUSY
- ts = get_timer (0); /* get current time */
-+#ifdef CONFIG_SYS_FPGA_CHECK_BUSY
- while ((*fn->busy) (cookie)) {
- /* XXX - we should have a check in here somewhere to
- * make sure we aren't busy forever... */
-@@ -216,6 +216,11 @@ static int Spartan3_sp_load(Xilinx_desc *desc, const void *buf, size_t bsize)
- }
- }
- #endif
-+ if (get_timer (ts) > CONFIG_SYS_FPGA_WAIT) { /* check the time */
-+ puts ("** Timeout waiting for BUSY to clear.\n");
-+ (*fn->abort) (cookie); /* abort the burn */
+ /* dump the data */
+ while (bytecount < bsize) {
+- /* XXX - do we check for an Ctrl-C press in here ??? */
++#ifdef CONFIG_SYS_FPGA_CHECK_CTRLC
++ if (ctrlc ()) {
++ (*fn->abort) (cookie);
+ return FPGA_FAIL;
+ }
++#endif
+
+ (*fn->clk) (false, true, cookie); /* Deassert the clock pin */
+ (*fn->clk) (true, true, cookie); /* Assert the clock pin */
+@@ -392,6 +403,12 @@ static int Spartan3_ss_load(Xilinx_desc
+ (*fn->bwr) (data, bsize, true, cookie);
+ else {
+ while (bytecount < bsize) {
++#ifdef CONFIG_SYS_FPGA_CHECK_CTRLC
++ if (ctrlc ()) {
++ (*fn->abort) (cookie);
++ return FPGA_FAIL;
++ }
++#endif
+
+ /* Xilinx detects an error if INIT goes low (active)
+ while DONE is low (inactive) */
+--- uboot-custom/include/fpga.h
++++ uboot-custom/include/fpga.h
+@@ -43,7 +43,7 @@
+
+ /* fpga_xxxx function return value definitions */
+ #define FPGA_SUCCESS 0
+-#define FPGA_FAIL -1
++#define FPGA_FAIL 1
- #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
- if (bytecount % (bsize / 40) == 0)
+ /* device numbers must be non-negative */
+ #define FPGA_INVALID_DEVICE -1
--
1.7.2.5
hooks/post-receive
--
armadeus
|