[U-Boot-Users] RFC: Some improvements for the FPGA subsystem

Grant Likely grant.likely at secretlab.ca
Mon Nov 12 01:17:39 CET 2007


On 11/11/07, Matthias Fuchs <matthias.fuchs at esd-electronics.com> wrote:
> Hi,
>
> we had some discussions about the FPGA subsystem some days (and also
> a couple of months) before on this list. I have also some local improvements
> for the FPGA subsystem.
>
> Before posting a couple of clean patches I dare to post a single patch just to
> get an ok for the different topics. When all points are clear, I will split my patch
> into one patch per per topic.
>
> This is what I like to get into U-Boot:
>
> 1) Replace the CONFIG_FPGA bit mask by U-Boot like configuration options:
>
> CONFIG_FPGA
>         - enable FPGA subsystem

This should be automatically selected by CONFIG_FPGA_<vendor>; for now
it's probably okay to have it done manually in the board config file;
but the move to Kconfig will allow for easy dependency checking.

>
> CONFIG_FPGA_<vendor>
>         - enable support for specific chip vendors
>         (ALTERA, XILINX)

Similarly, this should be automatically selected by CONFIG_FPGA_<family>

>
> CONFIG_FPGA_<family>
>         - enable support for FPGA family
>         (SPARTAN2, SPARTAN3, VIRTEX2, CYCLONE2, ACEX1K, ACEX)
>
> This means when you have an Xilinx Spartan3 FPGA on your board you
> typically have these lines in your board configuration:
>
> #define CONFIG_FPGA
> #define CONFIG_FPGA_XILINX
> #define CONFIG_FPGA_SPARTAN3
>
> (TODO: add this to the README file)
>
> 2) Fix FPGA support for some boards that will get broken through the
> above change (GEN860T, ...)
>
> 3) Remove bit swapping in fpga_loadbitstream().
>
> 4) Use AND-operation for checking MSB of bytes instead of sign check for
> Spartan2/3 FPGAs in slave serial code.
>
> 5) Add post() and pre() callback for Spartan2/3 FPGAs inslave serial mode.
>
> 6) Add some new FPGA types.
>
> Matthias

Sounds good to me.

>
>
> diff --git a/board/gen860t/fpga.c b/board/gen860t/fpga.c
> index 2ba7e0e..5997584 100644
> --- a/board/gen860t/fpga.c
> +++ b/board/gen860t/fpga.c
> @@ -34,7 +34,7 @@
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> -#if (CONFIG_FPGA)
> +#ifdef CONFIG_FPGA

#if defined(CONFIG_FPGA) is preferred.

Otherwise, this looks like the right direction to me.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195




More information about the U-Boot mailing list