2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2003-10-09 20:09:04 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2003
|
|
|
|
* Steven Scholz, imc Measurement & Control, steven.scholz@imc-berlin.de
|
|
|
|
*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Rich Ireland, Enterasys Networks, rireland@enterasys.com.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ACEX1K_H_
|
|
|
|
#define _ACEX1K_H_
|
|
|
|
|
|
|
|
#include <altera.h>
|
|
|
|
|
2011-07-30 13:33:49 +00:00
|
|
|
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);
|
2003-10-09 20:09:04 +00:00
|
|
|
|
2011-07-30 13:33:49 +00:00
|
|
|
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);
|
2006-08-15 12:15:51 +00:00
|
|
|
|
2003-10-09 20:09:04 +00:00
|
|
|
/* 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;
|
|
|
|
|
2006-08-15 12:15:51 +00:00
|
|
|
/* Slave Serial Implementation function table */
|
|
|
|
typedef struct {
|
|
|
|
Altera_pre_fn pre;
|
|
|
|
Altera_config_fn config;
|
|
|
|
Altera_status_fn status;
|
|
|
|
Altera_done_fn done;
|
|
|
|
Altera_write_fn write;
|
|
|
|
Altera_abort_fn abort;
|
|
|
|
Altera_post_fn post;
|
|
|
|
} Altera_CYC2_Passive_Serial_fns;
|
|
|
|
|
2003-10-09 20:09:04 +00:00
|
|
|
/* 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
|
2008-05-20 14:00:29 +00:00
|
|
|
#define Altera_EP1K100_SIZE 1337000/8 /* 167125 Bytes */
|
2003-10-09 20:09:04 +00:00
|
|
|
#endif
|
2008-05-20 14:00:29 +00:00
|
|
|
#define Altera_EP1K100_SIZE (166965*8)
|
2003-10-09 20:09:04 +00:00
|
|
|
|
2008-05-27 08:25:39 +00:00
|
|
|
#define Altera_EP2C8_SIZE 247942
|
|
|
|
#define Altera_EP2C20_SIZE 586562
|
2006-08-15 12:15:51 +00:00
|
|
|
#define Altera_EP2C35_SIZE 883905
|
2011-07-14 23:09:40 +00:00
|
|
|
#define Altera_EP3C5_SIZE 368011 /* .rbf size in bytes */
|
2006-08-15 12:15:51 +00:00
|
|
|
|
2019-06-28 12:41:20 +00:00
|
|
|
#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 */
|
|
|
|
|
2003-10-09 20:09:04 +00:00
|
|
|
/* Descriptor Macros
|
|
|
|
*********************************************************************/
|
|
|
|
/* ACEX1K devices */
|
|
|
|
#define Altera_EP1K100_DESC(iface, fn_table, cookie) \
|
|
|
|
{ Altera_ACEX1K, iface, Altera_EP1K100_SIZE, fn_table, cookie }
|
|
|
|
|
|
|
|
#endif /* _ACEX1K_H_ */
|