blob: 2aca954e73ab108dbd0f20fa84648d64e44fe1bb [file] [log] [blame]
wdenkc6097192002-11-03 00:24:07 +00001/*
2 * (C) Copyright 2002
3 * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc6097192002-11-03 00:24:07 +00006 */
7
8#ifndef _SPARTAN2_H_
9#define _SPARTAN2_H_
10
11#include <xilinx.h>
12
wdenkc6097192002-11-03 00:24:07 +000013/* Slave Parallel Implementation function table */
14typedef struct {
Michal Simek2df9d5c2014-03-13 12:58:20 +010015 xilinx_pre_fn pre;
16 xilinx_pgm_fn pgm;
17 xilinx_init_fn init;
18 xilinx_err_fn err;
19 xilinx_done_fn done;
20 xilinx_clk_fn clk;
21 xilinx_cs_fn cs;
22 xilinx_wr_fn wr;
23 xilinx_rdata_fn rdata;
24 xilinx_wdata_fn wdata;
25 xilinx_busy_fn busy;
26 xilinx_abort_fn abort;
27 xilinx_post_fn post;
Michal Simekb625b9a2014-03-13 11:23:43 +010028} xilinx_spartan2_slave_parallel_fns;
wdenkc6097192002-11-03 00:24:07 +000029
30/* Slave Serial Implementation function table */
31typedef struct {
Michal Simek2df9d5c2014-03-13 12:58:20 +010032 xilinx_pre_fn pre;
33 xilinx_pgm_fn pgm;
34 xilinx_clk_fn clk;
35 xilinx_init_fn init;
36 xilinx_done_fn done;
37 xilinx_wr_fn wr;
38 xilinx_post_fn post;
Michal Simekb625b9a2014-03-13 11:23:43 +010039} xilinx_spartan2_slave_serial_fns;
wdenkc6097192002-11-03 00:24:07 +000040
Michal Simek14cfc4f2014-03-13 13:07:57 +010041extern struct xilinx_fpga_op spartan2_op;
42
wdenkc6097192002-11-03 00:24:07 +000043/* Device Image Sizes
44 *********************************************************************/
45/* Spartan-II (2.5V) */
Wolfgang Denk53677ef2008-05-20 16:00:29 +020046#define XILINX_XC2S15_SIZE 197728/8
47#define XILINX_XC2S30_SIZE 336800/8
48#define XILINX_XC2S50_SIZE 559232/8
49#define XILINX_XC2S100_SIZE 781248/8
50#define XILINX_XC2S150_SIZE 1040128/8
51#define XILINX_XC2S200_SIZE 1335872/8
wdenkc6097192002-11-03 00:24:07 +000052
wdenk9dd611b2005-01-09 17:19:34 +000053/* Spartan-IIE (1.8V) */
54#define XILINX_XC2S50E_SIZE 630048/8
55#define XILINX_XC2S100E_SIZE 863840/8
56#define XILINX_XC2S150E_SIZE 1134496/8
57#define XILINX_XC2S200E_SIZE 1442016/8
58#define XILINX_XC2S300E_SIZE 1875648/8
59
wdenkc6097192002-11-03 00:24:07 +000060/* Descriptor Macros
61 *********************************************************************/
62/* Spartan-II devices */
63#define XILINX_XC2S15_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010064{ xilinx_spartan2, iface, XILINX_XC2S15_SIZE, fn_table, cookie, &spartan2_op }
wdenkc6097192002-11-03 00:24:07 +000065
66#define XILINX_XC2S30_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010067{ xilinx_spartan2, iface, XILINX_XC2S30_SIZE, fn_table, cookie, &spartan2_op }
wdenkc6097192002-11-03 00:24:07 +000068
69#define XILINX_XC2S50_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010070{ xilinx_spartan2, iface, XILINX_XC2S50_SIZE, fn_table, cookie, &spartan2_op }
wdenkc6097192002-11-03 00:24:07 +000071
72#define XILINX_XC2S100_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010073{ xilinx_spartan2, iface, XILINX_XC2S100_SIZE, fn_table, cookie, &spartan2_op }
wdenkc6097192002-11-03 00:24:07 +000074
75#define XILINX_XC2S150_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010076{ xilinx_spartan2, iface, XILINX_XC2S150_SIZE, fn_table, cookie, &spartan2_op }
wdenkc6097192002-11-03 00:24:07 +000077
Matthias Fuchs3bff4ff2007-12-27 17:12:56 +010078#define XILINX_XC2S200_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010079{ xilinx_spartan2, iface, XILINX_XC2S200_SIZE, fn_table, cookie, &spartan2_op }
Matthias Fuchs3bff4ff2007-12-27 17:12:56 +010080
wdenk9dd611b2005-01-09 17:19:34 +000081#define XILINX_XC2S50E_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010082{ xilinx_spartan2, iface, XILINX_XC2S50E_SIZE, fn_table, cookie, &spartan2_op }
wdenk9dd611b2005-01-09 17:19:34 +000083
84#define XILINX_XC2S100E_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010085{ xilinx_spartan2, iface, XILINX_XC2S100E_SIZE, fn_table, cookie, &spartan2_op }
wdenk9dd611b2005-01-09 17:19:34 +000086
87#define XILINX_XC2S150E_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010088{ xilinx_spartan2, iface, XILINX_XC2S150E_SIZE, fn_table, cookie, &spartan2_op }
wdenk9dd611b2005-01-09 17:19:34 +000089
90#define XILINX_XC2S200E_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010091{ xilinx_spartan2, iface, XILINX_XC2S200E_SIZE, fn_table, cookie, &spartan2_op }
wdenk9dd611b2005-01-09 17:19:34 +000092
93#define XILINX_XC2S300E_DESC(iface, fn_table, cookie) \
Michal Simek14cfc4f2014-03-13 13:07:57 +010094{ xilinx_spartan2, iface, XILINX_XC2S300E_SIZE, fn_table, cookie, &spartan2_op }
wdenk9dd611b2005-01-09 17:19:34 +000095
wdenkc6097192002-11-03 00:24:07 +000096#endif /* _SPARTAN2_H_ */