[U-Boot-Users] Some RFCs about U-Boot's the generic FPGA support

Laurent Pinchart laurentp at cse-semaphore.com
Mon Aug 20 15:47:24 CEST 2007


Hi Matthias,

On Monday 20 August 2007 15:13, Matthias Fuchs wrote:
> Hi,
>
> I am currently setting up a new board that will use U-Boot's generic
> FPGA support to boot zwi different Xilinx FPGA in slave serial mode.
> While grep'ing through the U-Boot board config files I noticed that
> nearly nobody uses this code.
>
> I made a couple of changes to the code. Some of them changes the
> current behavior a little bit, so I like to request for comments
> before submitting a final patch.
>
> Since nobody uses this code I see nothing that speaks against these
> changes:
>
> 1) Make the 'size' parameter obsolete for the 'fpga loadb' command.
> The actual bitstream size is taken from the bitstream.
>
> 2) Do not bit-swap the bytes in the xilinx bitstream. When using the
> slave serial code the bits may not be swapped. I can imagine that this
> swapping requirement comes from a special board layout. So is should
> be done in board specific code. When removing the swapping code, we
> can get rid of the complete malloc/free stuff in fpga_loadbitstream().

Bit-swapping is required when dealing with .bit files. The Development System 
Reference Guide, Chapter 16 (PROMgen) states that:

"In a bitstream contained in a BIT file, the Least Significant Bit (LSB) is 
always on the left side of a byte. But when a PROM programmer or a 
microprocessor reads a data byte, it identifies the LSB on the right side of 
the byte. In order for the PROM programmer or microprocessor to read the 
bitstream correctly, the bits in each byte must first be swapped so they are 
read in the correct order."

> 3) Fix a signed/unsigned issue in slave serial download code.
>
> 4) Make post() and pre() callback optional in relocation. So do
> not relocate NULL-pointers. This has been discussed a short time ago
> on the list.

Ack. I ran into the same issue and fixed the relocation issue, but found later 
that I actually needed pre() and post() methods, so I never submitted a 
patch.

> 5) Add a post() configuration callback for Spartan II devices in slave
> serial mode.
>
> 6) Add some more devices.
>
> 7) Minor typo fixes.
>
> Any comments?

You should probably split your patch. Point 6 is a good candidate for a 
standalone patch.

> BTW: Are there any boards that use the FPGA stuff and that are not
> made public ?:-)

Yes. I use slave-parallel loading with a Spartan-3E.

Best regards,

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussée de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75




More information about the U-Boot mailing list