[PATCH 2/3] fpga: Remove ancient ACEX1K support
Alexander Dahl
ada at thorsis.com
Fri Jul 25 14:30:18 CEST 2025
Hello Michal,
Am Fri, Jul 25, 2025 at 02:17:53PM +0200 schrieb Michal Simek:
>
>
> On 7/25/25 14:10, Alexander Dahl wrote:
> > Hello Michal,
> >
> > Am Fri, Jul 25, 2025 at 01:25:53PM +0200 schrieb Michal Simek:
> > > Coverity (CID 583149) reports issue on code which is not enabled by any
> > > real platform that's why remove it completely.
> > >
> > > Signed-off-by: Michal Simek <michal.simek at amd.com>
> > > ---
> > >
> > > configs/sandbox_defconfig | 1 -
> > > drivers/fpga/ACEX1K.c | 245 --------------------------------------
> > > drivers/fpga/Kconfig | 6 -
> > > drivers/fpga/Makefile | 1 -
> > > drivers/fpga/altera.c | 5 +-
> > > include/ACEX1K.h | 49 --------
> > > 6 files changed, 1 insertion(+), 306 deletions(-)
> > > delete mode 100644 drivers/fpga/ACEX1K.c
[…]
> > > diff --git a/include/ACEX1K.h b/include/ACEX1K.h
> > > index 7c5253c66cca..44d1b9765657 100644
> > > --- a/include/ACEX1K.h
> > > +++ b/include/ACEX1K.h
> > > @@ -12,26 +12,10 @@
> > > #include <altera.h>
> > > -extern int ACEX1K_load(Altera_desc *desc, const void *image, size_t size);
> > > -extern int ACEX1K_dump(Altera_desc *desc, const void *buf, size_t bsize);
> > > -extern int ACEX1K_info(Altera_desc *desc);
> > > -
> > > extern int CYC2_load(Altera_desc *desc, const void *image, size_t size);
> > > extern int CYC2_dump(Altera_desc *desc, const void *buf, size_t bsize);
> > > extern int CYC2_info(Altera_desc *desc);
> >
> > Maybe CYC2_load() etc. can be moved to a different header file like
> > altera.h for example?
> >
> > > -/* Slave Serial Implementation function table */
> > > -typedef struct {
> > > - Altera_pre_fn pre;
> > > - Altera_config_fn config;
> > > - Altera_clk_fn clk;
> > > - Altera_status_fn status;
> > > - Altera_done_fn done;
> > > - Altera_data_fn data;
> > > - Altera_abort_fn abort;
> > > - Altera_post_fn post;
> > > -} Altera_ACEX1K_Passive_Serial_fns;
> > > -
> > > /* Slave Serial Implementation function table */
> > > typedef struct {
> > > Altera_pre_fn pre;
> > > @@ -43,37 +27,4 @@ typedef struct {
> > > Altera_post_fn post;
> > > } Altera_CYC2_Passive_Serial_fns;
> > > -/* Device Image Sizes
> > > - *********************************************************************/
> > > -/* ACEX1K */
> > > -/* FIXME: Which size do we mean?
> > > - * Datasheet says 1337000/8=167125Bytes,
> > > - * Filesize of an *.rbf file is 166965 Bytes
> > > - */
> > > -#if 0
> > > -#define Altera_EP1K100_SIZE 1337000/8 /* 167125 Bytes */
> > > -#endif
> > > -#define Altera_EP1K100_SIZE (166965*8)
> > > -
> > > -#define Altera_EP2C8_SIZE 247942
> > > -#define Altera_EP2C20_SIZE 586562
> > > -#define Altera_EP2C35_SIZE 883905
> > > -#define Altera_EP3C5_SIZE 368011 /* .rbf size in bytes */
> > > -
> > > -#define ALTERA_EP4CE6_SIZE 368011 /* 2944088 Bits */
> > > -#define ALTERA_EP4CE10_SIZE 368011 /* 2944088 Bits */
> > > -#define ALTERA_EP4CE15_SIZE 510856 /* 4086848 Bits */
> > > -#define ALTERA_EP4CE22_SIZE 718569 /* 5748552 Bits */
> > > -#define ALTERA_EP4CE30_SIZE 1191788 /* 9534304 Bits */
> > > -#define ALTERA_EP4CE40_SIZE 1191788 /* 9534304 Bits */
> > > -#define ALTERA_EP4CE55_SIZE 1861195 /* 14889560 Bits */
> > > -#define ALTERA_EP4CE75_SIZE 2495719 /* 19965752 Bits */
> > > -#define ALTERA_EP4CE115_SIZE 3571462 /* 28571696 Bits */
> >
> > Can we move these definitions for device image sizes to altera.h
> > instead removing them? I added some of those with commit 3b2a595fc659
> > ("fpga: altera: Add some more device sizes") back in 2019, and I'm
> > using some of them in downstream code/dts.
>
> I expect you are also saying that these are Cyclone 2 related right?
Yes. Only EP1K* is related to ACEX-1K. EP2C* is Cyclone II, EP3C*
relates to Cyclone III, EP4C* to Cyclone IV.
These are the maximum bitstream sizes of different chip variants, and
can directly be compared to .rbf file sizes (in octets). Not sure why
the cyclone sizes are in that acex header, but maybe because there was
no dedicated cyclone header? I would just move them to a cyclone
header or to the generic altera header.
> No issue from my side.
:-)
Alex
More information about the U-Boot
mailing list