blob: 7b8cc3a252144f6d9d829009a6014c3cc7c29dab [file] [log] [blame]
Insop Songe7185c692014-01-20 23:47:06 -08001/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Insop Songe7185c692014-01-20 23:47:06 -080010 * GNU General Public License for more details.
Insop Songe7185c692014-01-20 23:47:06 -080011 */
12
13#include <linux/firmware.h>
14
15#define MAX_STR 256
16
17enum fmt_image {
18 f_bit, /* only bitstream is supported */
19 f_rbt,
20 f_bin,
21 f_mcs,
22 f_hex,
23};
24
25enum mdownload {
26 m_systemmap, /* only system map is supported */
27 m_serial,
28 m_jtag,
29};
30
31/*
32 * xilinx fpgaimage information
33 * NOTE: use MAX_STR instead of dynamic alloc for simplicity
34 */
35struct fpgaimage {
36 enum fmt_image fmt_img;
37 enum mdownload dmethod;
38
39 const struct firmware *fw_entry;
40
41 /*
42 * the followings can be read from bitstream,
43 * but other image format should have as well
44 */
45 char filename[MAX_STR];
46 char part[MAX_STR];
47 char date[MAX_STR];
48 char time[MAX_STR];
Sandhya Bankarc70aa602016-03-13 16:41:23 +053049 int lendata;
Insop Songe7185c692014-01-20 23:47:06 -080050 char *fpgadata;
51};