[U-Boot-Users] RFC: Xilinx Spartan3 relocation code

Matthias Fuchs matthias.fuchs at esd-electronics.com
Fri Aug 17 13:03:51 CEST 2007


The generic FPGA code under common is ok. Our own code is historic.
It has been written long before the generic code made it into U-Boot.
But new boards will use the generic code. Because many of our boards
have FPGAs i assume that that will be more boards using the generic code
in the future.

On Thursday 16 August 2007 18:37, Bruce_Leonard at selinc.com wrote:
> > we are using our own U-Boot FPGA boot code for Xilinx Spartan/2 FPGAs 
> > from board/esd/common/fpga.c for all of our current boards.
> > Because this code is restricted to a single FPGA I started with the 
> > generic FPGA code for a new design that is still on my desk.
> > The U-Boot port will be submitted in a couple of days.
> > 
> > I fixed and added some things for the generic FPGA boot. Patches will be
> > posted with the new board patch.
> 
> I'm just using the generic FPGA code in the common directory.  Did you 
> re-write stuff because things are broken?  I ask because we're having 
> trouble getting the FPGA to program.  We're currently assuming that our 
> interface to the FPGA is broken, but if there's known issues in the 
> generic code that would be nice to know :).
There is one thing I had to change to get the generic code for Spartan FPGAs in
slave serial mode to work:

	/* Write data */
	(*fn->wr) ((val < 0), TRUE, cookie);

The the 'val' variable in the wr-callback parameter must be signed. When compiling
with ELDK's 4.1 gcc for a 4xx CPU I got a warning that the comparision is always true.
Perhaps that is a problem on your site, too?

Matthias





More information about the U-Boot mailing list