blob: 2383c69210e2b895b75c4b01871f44b3210b5a81 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenk5d3207d2002-08-21 22:08:56 +00002/*
3 * (C) Copyright 2002
4 * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
5 * Keith Outwater, keith_outwater@mvis.com
wdenk5d3207d2002-08-21 22:08:56 +00006 */
7
8/*
9 * Configuration support for Xilinx Virtex2 devices. Based
10 * on spartan2.c (Rich Ireland, rireland@enterasys.com).
11 */
12
13#include <common.h>
Simon Glass24b852a2015-11-08 23:47:45 -070014#include <console.h>
wdenk5d3207d2002-08-21 22:08:56 +000015#include <virtex2.h>
16
Wolfgang Denk9a9200b2005-09-24 23:41:00 +020017#if 0
18#define FPGA_DEBUG
Wolfgang Denk265817c2005-09-25 00:53:22 +020019#endif
Wolfgang Denk9a9200b2005-09-24 23:41:00 +020020
wdenk5d3207d2002-08-21 22:08:56 +000021#ifdef FPGA_DEBUG
Robert Hancockfa57af02019-06-18 09:47:12 -060022#define PRINTF(fmt, args...) printf(fmt, ##args)
wdenk5d3207d2002-08-21 22:08:56 +000023#else
Robert Hancockfa57af02019-06-18 09:47:12 -060024#define PRINTF(fmt, args...)
wdenk5d3207d2002-08-21 22:08:56 +000025#endif
26
27/*
28 * If the SelectMap interface can be overrun by the processor, define
Robert Hancockfa57af02019-06-18 09:47:12 -060029 * CONFIG_SYS_FPGA_CHECK_BUSY and/or CONFIG_FPGA_DELAY in the board
30 * configuration file and add board-specific support for checking BUSY status.
31 * By default, assume that the SelectMap interface cannot be overrun.
wdenk5d3207d2002-08-21 22:08:56 +000032 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020033#ifndef CONFIG_SYS_FPGA_CHECK_BUSY
34#undef CONFIG_SYS_FPGA_CHECK_BUSY
wdenk5d3207d2002-08-21 22:08:56 +000035#endif
36
37#ifndef CONFIG_FPGA_DELAY
38#define CONFIG_FPGA_DELAY()
39#endif
40
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020041#ifndef CONFIG_SYS_FPGA_PROG_FEEDBACK
42#define CONFIG_SYS_FPGA_PROG_FEEDBACK
wdenk5d3207d2002-08-21 22:08:56 +000043#endif
44
45/*
46 * Don't allow config cycle to be interrupted
47 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020048#ifndef CONFIG_SYS_FPGA_CHECK_CTRLC
49#undef CONFIG_SYS_FPGA_CHECK_CTRLC
wdenk5d3207d2002-08-21 22:08:56 +000050#endif
51
52/*
53 * Check for errors during configuration by default
54 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020055#ifndef CONFIG_SYS_FPGA_CHECK_ERROR
56#define CONFIG_SYS_FPGA_CHECK_ERROR
wdenk5d3207d2002-08-21 22:08:56 +000057#endif
58
59/*
60 * The default timeout in mS for INIT_B to deassert after PROG_B has
61 * been deasserted. Per the latest Virtex II Handbook (page 347), the
62 * max time from PORG_B deassertion to INIT_B deassertion is 4uS per
63 * data frame for the XC2V8000. The XC2V8000 has 2860 data frames
64 * which yields 11.44 mS. So let's make it bigger in order to handle
65 * an XC2V1000, if anyone can ever get ahold of one.
66 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020067#ifndef CONFIG_SYS_FPGA_WAIT_INIT
Robert Hancockfa57af02019-06-18 09:47:12 -060068#define CONFIG_SYS_FPGA_WAIT_INIT CONFIG_SYS_HZ / 2 /* 500 ms */
wdenk5d3207d2002-08-21 22:08:56 +000069#endif
70
71/*
72 * The default timeout for waiting for BUSY to deassert during configuration.
73 * This is normally not necessary since for most reasonable configuration
74 * clock frequencies (i.e. 66 MHz or less), BUSY monitoring is unnecessary.
75 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020076#ifndef CONFIG_SYS_FPGA_WAIT_BUSY
Robert Hancockfa57af02019-06-18 09:47:12 -060077#define CONFIG_SYS_FPGA_WAIT_BUSY CONFIG_SYS_HZ / 200 /* 5 ms*/
wdenk5d3207d2002-08-21 22:08:56 +000078#endif
79
80/* Default timeout for waiting for FPGA to enter operational mode after
81 * configuration data has been written.
82 */
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020083#ifndef CONFIG_SYS_FPGA_WAIT_CONFIG
Robert Hancockfa57af02019-06-18 09:47:12 -060084#define CONFIG_SYS_FPGA_WAIT_CONFIG CONFIG_SYS_HZ / 5 /* 200 ms */
wdenk5d3207d2002-08-21 22:08:56 +000085#endif
86
Michal Simekf8c1be92014-03-13 12:49:21 +010087static int virtex2_ssm_load(xilinx_desc *desc, const void *buf, size_t bsize);
88static int virtex2_ssm_dump(xilinx_desc *desc, const void *buf, size_t bsize);
wdenk5d3207d2002-08-21 22:08:56 +000089
Michal Simekf8c1be92014-03-13 12:49:21 +010090static int virtex2_ss_load(xilinx_desc *desc, const void *buf, size_t bsize);
91static int virtex2_ss_dump(xilinx_desc *desc, const void *buf, size_t bsize);
wdenk5d3207d2002-08-21 22:08:56 +000092
Michal Simek7a78bd22014-05-02 14:09:30 +020093static int virtex2_load(xilinx_desc *desc, const void *buf, size_t bsize,
94 bitstream_type bstype)
wdenk5d3207d2002-08-21 22:08:56 +000095{
96 int ret_val = FPGA_FAIL;
97
98 switch (desc->iface) {
99 case slave_serial:
Robert Hancockfa57af02019-06-18 09:47:12 -0600100 PRINTF("%s: Launching Slave Serial Load\n", __func__);
Michal Simekd9071ce2014-03-13 11:33:36 +0100101 ret_val = virtex2_ss_load(desc, buf, bsize);
wdenk5d3207d2002-08-21 22:08:56 +0000102 break;
103
104 case slave_selectmap:
Robert Hancockfa57af02019-06-18 09:47:12 -0600105 PRINTF("%s: Launching Slave Parallel Load\n", __func__);
Michal Simekd9071ce2014-03-13 11:33:36 +0100106 ret_val = virtex2_ssm_load(desc, buf, bsize);
wdenk5d3207d2002-08-21 22:08:56 +0000107 break;
108
109 default:
Robert Hancockfa57af02019-06-18 09:47:12 -0600110 printf("%s: Unsupported interface type, %d\n",
111 __func__, desc->iface);
wdenk5d3207d2002-08-21 22:08:56 +0000112 }
113 return ret_val;
114}
115
Michal Simek14cfc4f2014-03-13 13:07:57 +0100116static int virtex2_dump(xilinx_desc *desc, const void *buf, size_t bsize)
wdenk5d3207d2002-08-21 22:08:56 +0000117{
118 int ret_val = FPGA_FAIL;
119
120 switch (desc->iface) {
121 case slave_serial:
Robert Hancockfa57af02019-06-18 09:47:12 -0600122 PRINTF("%s: Launching Slave Serial Dump\n", __func__);
Michal Simekd9071ce2014-03-13 11:33:36 +0100123 ret_val = virtex2_ss_dump(desc, buf, bsize);
wdenk5d3207d2002-08-21 22:08:56 +0000124 break;
125
126 case slave_parallel:
Robert Hancockfa57af02019-06-18 09:47:12 -0600127 PRINTF("%s: Launching Slave Parallel Dump\n", __func__);
Michal Simekd9071ce2014-03-13 11:33:36 +0100128 ret_val = virtex2_ssm_dump(desc, buf, bsize);
wdenk5d3207d2002-08-21 22:08:56 +0000129 break;
130
131 default:
Robert Hancockfa57af02019-06-18 09:47:12 -0600132 printf("%s: Unsupported interface type, %d\n",
133 __func__, desc->iface);
wdenk5d3207d2002-08-21 22:08:56 +0000134 }
135 return ret_val;
136}
137
Michal Simek14cfc4f2014-03-13 13:07:57 +0100138static int virtex2_info(xilinx_desc *desc)
wdenk5d3207d2002-08-21 22:08:56 +0000139{
140 return FPGA_SUCCESS;
141}
142
wdenk5d3207d2002-08-21 22:08:56 +0000143/*
144 * Virtex-II Slave SelectMap configuration loader. Configuration via
145 * SelectMap is as follows:
146 * 1. Set the FPGA's PROG_B line low.
147 * 2. Set the FPGA's PROG_B line high. Wait for INIT_B to go high.
148 * 3. Write data to the SelectMap port. If INIT_B goes low at any time
149 * this process, a configuration error (most likely CRC failure) has
150 * ocurred. At this point a status word may be read from the
151 * SelectMap interface to determine the source of the problem (You
Wolfgang Denk9a9200b2005-09-24 23:41:00 +0200152 * could, for instance, put this in your 'abort' function handler).
wdenk5d3207d2002-08-21 22:08:56 +0000153 * 4. After all data has been written, test the state of the FPGA
154 * INIT_B and DONE lines. If both are high, configuration has
155 * succeeded. Congratulations!
156 */
Robert Hancock33720812019-06-18 09:47:14 -0600157static int virtex2_slave_pre(xilinx_virtex2_slave_selectmap_fns *fn, int cookie)
wdenk5d3207d2002-08-21 22:08:56 +0000158{
Robert Hancock33720812019-06-18 09:47:14 -0600159 unsigned long ts;
wdenk5d3207d2002-08-21 22:08:56 +0000160
Robert Hancockfa57af02019-06-18 09:47:12 -0600161 PRINTF("%s:%d: Start with interface functions @ 0x%p\n",
162 __func__, __LINE__, fn);
wdenk5d3207d2002-08-21 22:08:56 +0000163
Robert Hancock33720812019-06-18 09:47:14 -0600164 if (!fn) {
165 printf("%s:%d: NULL Interface function table!\n",
166 __func__, __LINE__);
167 return FPGA_FAIL;
168 }
wdenk5d3207d2002-08-21 22:08:56 +0000169
Robert Hancock33720812019-06-18 09:47:14 -0600170 /* Gotta split this one up (so the stack won't blow??) */
171 PRINTF("%s:%d: Function Table:\n"
172 " base 0x%p\n"
173 " struct 0x%p\n"
174 " pre 0x%p\n"
175 " prog 0x%p\n"
176 " init 0x%p\n"
177 " error 0x%p\n",
178 __func__, __LINE__,
179 &fn, fn, fn->pre, fn->pgm, fn->init, fn->err);
180 PRINTF(" clock 0x%p\n"
181 " cs 0x%p\n"
182 " write 0x%p\n"
183 " rdata 0x%p\n"
184 " wdata 0x%p\n"
185 " busy 0x%p\n"
186 " abort 0x%p\n"
187 " post 0x%p\n\n",
188 fn->clk, fn->cs, fn->wr, fn->rdata, fn->wdata,
189 fn->busy, fn->abort, fn->post);
wdenk5d3207d2002-08-21 22:08:56 +0000190
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200191#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
Robert Hancock33720812019-06-18 09:47:14 -0600192 printf("Initializing FPGA Device %d...\n", cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000193#endif
Robert Hancock33720812019-06-18 09:47:14 -0600194 /*
195 * Run the pre configuration function if there is one.
196 */
197 if (*fn->pre)
198 (*fn->pre)(cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000199
Robert Hancock33720812019-06-18 09:47:14 -0600200 /*
201 * Assert the program line. The minimum pulse width for
202 * Virtex II devices is 300 nS (Tprogram parameter in datasheet).
203 * There is no maximum value for the pulse width. Check to make
204 * sure that INIT_B goes low after assertion of PROG_B
205 */
206 (*fn->pgm)(true, true, cookie);
207 udelay(10);
208 ts = get_timer(0);
209 do {
210 if (get_timer(ts) > CONFIG_SYS_FPGA_WAIT_INIT) {
211 printf("%s:%d: ** Timeout after %d ticks waiting for INIT to assert.\n",
212 __func__, __LINE__, CONFIG_SYS_FPGA_WAIT_INIT);
213 (*fn->abort)(cookie);
214 return FPGA_FAIL;
215 }
216 } while (!(*fn->init)(cookie));
wdenk5d3207d2002-08-21 22:08:56 +0000217
Robert Hancock33720812019-06-18 09:47:14 -0600218 (*fn->pgm)(false, true, cookie);
219 CONFIG_FPGA_DELAY();
220 if (fn->clk)
Robert Hancockfa57af02019-06-18 09:47:12 -0600221 (*fn->clk)(true, true, cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000222
Robert Hancock33720812019-06-18 09:47:14 -0600223 /*
224 * Start a timer and wait for INIT_B to go high
225 */
226 ts = get_timer(0);
227 do {
228 CONFIG_FPGA_DELAY();
229 if (get_timer(ts) > CONFIG_SYS_FPGA_WAIT_INIT) {
230 printf("%s:%d: ** Timeout after %d ticks waiting for INIT to deassert.\n",
231 __func__, __LINE__, CONFIG_SYS_FPGA_WAIT_INIT);
232 (*fn->abort)(cookie);
233 return FPGA_FAIL;
234 }
235 } while ((*fn->init)(cookie) && (*fn->busy)(cookie));
wdenk5d3207d2002-08-21 22:08:56 +0000236
Robert Hancock33720812019-06-18 09:47:14 -0600237 if (fn->wr)
Robert Hancockfa57af02019-06-18 09:47:12 -0600238 (*fn->wr)(true, true, cookie);
Robert Hancock33720812019-06-18 09:47:14 -0600239 if (fn->cs)
Robert Hancockfa57af02019-06-18 09:47:12 -0600240 (*fn->cs)(true, true, cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000241
Robert Hancock33720812019-06-18 09:47:14 -0600242 mdelay(10);
243 return FPGA_SUCCESS;
244}
wdenk5d3207d2002-08-21 22:08:56 +0000245
Robert Hancock33720812019-06-18 09:47:14 -0600246static int virtex2_slave_post(xilinx_virtex2_slave_selectmap_fns *fn,
247 int cookie)
248{
249 int ret_val = FPGA_SUCCESS;
250 unsigned long ts;
Wolfgang Denk9a9200b2005-09-24 23:41:00 +0200251
Robert Hancock33720812019-06-18 09:47:14 -0600252 /*
253 * Finished writing the data; deassert FPGA CS_B and WRITE_B signals.
254 */
255 CONFIG_FPGA_DELAY();
256 if (fn->cs)
Robert Hancockfa57af02019-06-18 09:47:12 -0600257 (*fn->cs)(false, true, cookie);
Robert Hancock33720812019-06-18 09:47:14 -0600258 if (fn->wr)
Robert Hancockfa57af02019-06-18 09:47:12 -0600259 (*fn->wr)(false, true, cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000260
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200261#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
Robert Hancock33720812019-06-18 09:47:14 -0600262 putc('\n');
wdenk5d3207d2002-08-21 22:08:56 +0000263#endif
264
Robert Hancock33720812019-06-18 09:47:14 -0600265 /*
266 * Check for successful configuration. FPGA INIT_B and DONE
267 * should both be high upon successful configuration.
268 */
269 ts = get_timer(0);
270 ret_val = FPGA_SUCCESS;
271 while (((*fn->done)(cookie) == FPGA_FAIL) ||
272 (*fn->init)(cookie)) {
273 if (get_timer(ts) > CONFIG_SYS_FPGA_WAIT_CONFIG) {
274 printf("%s:%d: ** Timeout after %d ticks waiting for DONE to assert and INIT to deassert\n",
275 __func__, __LINE__, CONFIG_SYS_FPGA_WAIT_CONFIG);
276 (*fn->abort)(cookie);
277 ret_val = FPGA_FAIL;
278 break;
279 }
280 }
281
282 if (ret_val == FPGA_SUCCESS) {
283#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
284 printf("Initialization of FPGA device %d complete\n", cookie);
285#endif
wdenk5d3207d2002-08-21 22:08:56 +0000286 /*
Robert Hancock33720812019-06-18 09:47:14 -0600287 * Run the post configuration function if there is one.
wdenk5d3207d2002-08-21 22:08:56 +0000288 */
Robert Hancock33720812019-06-18 09:47:14 -0600289 if (*fn->post)
290 (*fn->post)(cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000291 } else {
Robert Hancock33720812019-06-18 09:47:14 -0600292#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
293 printf("** Initialization of FPGA device %d FAILED\n",
294 cookie);
295#endif
wdenk5d3207d2002-08-21 22:08:56 +0000296 }
297 return ret_val;
298}
299
Robert Hancock33720812019-06-18 09:47:14 -0600300static int virtex2_ssm_load(xilinx_desc *desc, const void *buf, size_t bsize)
301{
302 int ret_val = FPGA_FAIL;
303 xilinx_virtex2_slave_selectmap_fns *fn = desc->iface_fns;
304 size_t bytecount = 0;
305 unsigned char *data = (unsigned char *)buf;
306 int cookie = desc->cookie;
307
308 ret_val = virtex2_slave_pre(fn, cookie);
309 if (ret_val != FPGA_SUCCESS)
310 return ret_val;
311
312 /*
313 * Load the data byte by byte
314 */
315 while (bytecount < bsize) {
316#ifdef CONFIG_SYS_FPGA_CHECK_CTRLC
317 if (ctrlc()) {
318 (*fn->abort)(cookie);
319 return FPGA_FAIL;
320 }
321#endif
322
323 if ((*fn->done)(cookie) == FPGA_SUCCESS) {
324 PRINTF("%s:%d:done went active early, bytecount = %d\n",
325 __func__, __LINE__, bytecount);
326 break;
327 }
328
329#ifdef CONFIG_SYS_FPGA_CHECK_ERROR
330 if ((*fn->init)(cookie)) {
331 printf("\n%s:%d: ** Error: INIT asserted during configuration\n",
332 __func__, __LINE__);
333 printf("%zu = buffer offset, %zu = buffer size\n",
334 bytecount, bsize);
335 (*fn->abort)(cookie);
336 return FPGA_FAIL;
337 }
338#endif
339
340 (*fn->wdata)(data[bytecount++], true, cookie);
341 CONFIG_FPGA_DELAY();
342
343 /*
344 * Cycle the clock pin
345 */
346 (*fn->clk)(false, true, cookie);
347 CONFIG_FPGA_DELAY();
348 (*fn->clk)(true, true, cookie);
349
350#ifdef CONFIG_SYS_FPGA_CHECK_BUSY
351 ts = get_timer(0);
352 while ((*fn->busy)(cookie)) {
353 if (get_timer(ts) > CONFIG_SYS_FPGA_WAIT_BUSY) {
354 printf("%s:%d: ** Timeout after %d ticks waiting for BUSY to deassert\n",
355 __func__, __LINE__,
356 CONFIG_SYS_FPGA_WAIT_BUSY);
357 (*fn->abort)(cookie);
358 return FPGA_FAIL;
359 }
360 }
361#endif
362
363#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
364 if (bytecount % (bsize / 40) == 0)
365 putc('.');
366#endif
367 }
368
369 return virtex2_slave_post(fn, cookie);
370}
371
wdenk5d3207d2002-08-21 22:08:56 +0000372/*
373 * Read the FPGA configuration data
374 */
Michal Simekf8c1be92014-03-13 12:49:21 +0100375static int virtex2_ssm_dump(xilinx_desc *desc, const void *buf, size_t bsize)
wdenk5d3207d2002-08-21 22:08:56 +0000376{
377 int ret_val = FPGA_FAIL;
Michal Simekd9071ce2014-03-13 11:33:36 +0100378 xilinx_virtex2_slave_selectmap_fns *fn = desc->iface_fns;
wdenk5d3207d2002-08-21 22:08:56 +0000379
380 if (fn) {
Robert Hancockfa57af02019-06-18 09:47:12 -0600381 unsigned char *data = (unsigned char *)buf;
wdenk5d3207d2002-08-21 22:08:56 +0000382 size_t bytecount = 0;
383 int cookie = desc->cookie;
384
Robert Hancockfa57af02019-06-18 09:47:12 -0600385 printf("Starting Dump of FPGA Device %d...\n", cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000386
Robert Hancockfa57af02019-06-18 09:47:12 -0600387 (*fn->cs)(true, true, cookie);
388 (*fn->clk)(true, true, cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000389
390 while (bytecount < bsize) {
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200391#ifdef CONFIG_SYS_FPGA_CHECK_CTRLC
Robert Hancockfa57af02019-06-18 09:47:12 -0600392 if (ctrlc()) {
393 (*fn->abort)(cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000394 return FPGA_FAIL;
395 }
396#endif
397 /*
398 * Cycle the clock and read the data
399 */
Robert Hancockfa57af02019-06-18 09:47:12 -0600400 (*fn->clk)(false, true, cookie);
401 (*fn->clk)(true, true, cookie);
402 (*fn->rdata)(&data[bytecount++], cookie);
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200403#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
wdenk5d3207d2002-08-21 22:08:56 +0000404 if (bytecount % (bsize / 40) == 0)
Robert Hancockfa57af02019-06-18 09:47:12 -0600405 putc('.');
wdenk5d3207d2002-08-21 22:08:56 +0000406#endif
407 }
408
409 /*
410 * Deassert CS_B and cycle the clock to deselect the device.
411 */
Robert Hancockfa57af02019-06-18 09:47:12 -0600412 (*fn->cs)(false, false, cookie);
413 (*fn->clk)(false, true, cookie);
414 (*fn->clk)(true, true, cookie);
wdenk5d3207d2002-08-21 22:08:56 +0000415
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +0200416#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK
Robert Hancockfa57af02019-06-18 09:47:12 -0600417 putc('\n');
wdenk5d3207d2002-08-21 22:08:56 +0000418#endif
Robert Hancockfa57af02019-06-18 09:47:12 -0600419 puts("Done.\n");
wdenk5d3207d2002-08-21 22:08:56 +0000420 } else {
Robert Hancockfa57af02019-06-18 09:47:12 -0600421 printf("%s:%d: NULL Interface function table!\n",
422 __func__, __LINE__);
wdenk5d3207d2002-08-21 22:08:56 +0000423 }
424 return ret_val;
425}
426
Michal Simekf8c1be92014-03-13 12:49:21 +0100427static int virtex2_ss_load(xilinx_desc *desc, const void *buf, size_t bsize)
wdenk5d3207d2002-08-21 22:08:56 +0000428{
Robert Hancockfa57af02019-06-18 09:47:12 -0600429 printf("%s: Slave Serial Loading is unsupported\n", __func__);
wdenk5d3207d2002-08-21 22:08:56 +0000430 return FPGA_FAIL;
431}
432
Michal Simekf8c1be92014-03-13 12:49:21 +0100433static int virtex2_ss_dump(xilinx_desc *desc, const void *buf, size_t bsize)
wdenk5d3207d2002-08-21 22:08:56 +0000434{
Robert Hancockfa57af02019-06-18 09:47:12 -0600435 printf("%s: Slave Serial Dumping is unsupported\n", __func__);
wdenk5d3207d2002-08-21 22:08:56 +0000436 return FPGA_FAIL;
437}
438
wdenk5d3207d2002-08-21 22:08:56 +0000439/* vim: set ts=4 tw=78: */
Michal Simek14cfc4f2014-03-13 13:07:57 +0100440
441struct xilinx_fpga_op virtex2_op = {
442 .load = virtex2_load,
443 .dump = virtex2_dump,
444 .info = virtex2_info,
445};