From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Adler Date: Sat, 30 Jun 2007 06:01:29 -0700 Subject: [U-Boot-Users] [PATCH] fix for "fpga load" on spartan3 in slave parallel mode Message-ID: <46865429.6030905@ccpu.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The while loop exits too soon if the "busy" function is a dummy function which always returns false. diff -pur a/common/spartan3.c b/common/spartan3.c --- a/common/spartan3.c 2007-06-30 05:15:22.000000000 -0700 +++ b/common/spartan3.c 2007-06-30 05:17:30.000000000 -0700 @@ -176,7 +176,7 @@ static int Spartan3_sp_load (Xilinx_desc "read data:\t0x%p\n" "write data:\t0x%p\n" "busy:\t0x%p\n" - "abort:\t0x%p\n", + "abort:\t0x%p\n" "post:\t0x%p\n\n", __FUNCTION__, &fn, fn, fn->pre, fn->pgm, fn->init, fn->err, fn->clk, fn->cs, fn->wr, fn->rdata, fn->wdata, fn->busy, @@ -213,7 +213,7 @@ static int Spartan3_sp_load (Xilinx_desc (*fn->abort) (cookie); /* abort the burn */ return FPGA_FAIL; } - } while ((*fn->init) (cookie) && (*fn->busy) (cookie)); + } while ((*fn->init) (cookie) || (*fn->busy) (cookie)); (*fn->wr) (TRUE, TRUE, cookie); /* Assert write, commit */ (*fn->cs) (TRUE, TRUE, cookie); /* Assert chip select, commit */