fsl/fman: fix error handling
[linux-2.6-block.git] / drivers / staging / gs_fpgaboot / gs_fpgaboot.h
CommitLineData
e7185c69
IS
1/*
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
10 *
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 */
17
18#include <linux/firmware.h>
19
20#define MAX_STR 256
21
22enum fmt_image {
23 f_bit, /* only bitstream is supported */
24 f_rbt,
25 f_bin,
26 f_mcs,
27 f_hex,
28};
29
30enum mdownload {
31 m_systemmap, /* only system map is supported */
32 m_serial,
33 m_jtag,
34};
35
36/*
37 * xilinx fpgaimage information
38 * NOTE: use MAX_STR instead of dynamic alloc for simplicity
39 */
40struct fpgaimage {
41 enum fmt_image fmt_img;
42 enum mdownload dmethod;
43
44 const struct firmware *fw_entry;
45
46 /*
47 * the followings can be read from bitstream,
48 * but other image format should have as well
49 */
50 char filename[MAX_STR];
51 char part[MAX_STR];
52 char date[MAX_STR];
53 char time[MAX_STR];
c70aa60b 54 int lendata;
e7185c69
IS
55 char *fpgadata;
56};