[U-Boot-Users] [PATCH] Spartan3 family support

llandre r&d2 at dave-tech.it
Wed Apr 27 12:09:39 CEST 2005


Hi Kurt,

I've just applied your patch to add Spartan III support on my custom
hardware (PPChameleon AMCC405EP).
To write the board-specific functions I used the file board/gen860t/fpga.c
as starting point. I work with cross GCC 2.95.4 provided by ELDK 2.0.2.
The programming technique is slave serial.
To make the code to work I had to apply some slight changes:

1) In function Spartan3_ss_load I had to replace this line

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

with
         if (val & 0x80) {
                 (*fn->wr) (1, TRUE, cookie);
         } else {
                 (*fn->wr) (0, TRUE, cookie);
         }

It seems the compiler does not like the expression (val < 0) because
it is always evaluated to 0.

2) It seems the board-specific function fpga_done_fn in board/gen860t/fpga.c
is wrong because it returns the error codes (either FPGA_SUCCESS or 
FPGA_FAIL). In my
understanding it must return the state of the pin (0 when the DONE
pin is low, 1 when it is high).

3) I tried to use both the "fpga load" and "fpga loadb" commands
respectively with the .bin and .bit files. The first one runs succesfully
while the latter fails. In this case the header is parsed correctly
but the FPGA is not programmed and the DONE does not go high.




Best regards,
llandre

DAVE Electronics System House - R&D Department
web:   http://www.dave-tech.it
email: r&d2 at dave-tech.it



>Hi all.
>
>This small patch, against current cvs, adds Xilinx Spartan3 support. Only
>the bitstream size differs from the Spartan2 family, the configuration
>method stays the same.
>
>Regards
>Kurt
>
>CHANGELOG:
>* Patch by Kurt Stremerch, 14 February 2005:
>   Add Xilinx Spartan3 family fpga support






More information about the U-Boot mailing list