• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 
3 #include <linux/firmware.h>
4 
5 #define	MAX_STR	256
6 
7 enum fmt_image {
8 	f_bit,	/* only bitstream is supported */
9 	f_rbt,
10 	f_bin,
11 	f_mcs,
12 	f_hex,
13 };
14 
15 enum mdownload {
16 	m_systemmap,	/* only system map is supported */
17 	m_serial,
18 	m_jtag,
19 };
20 
21 /*
22  * xilinx fpgaimage information
23  * NOTE: use MAX_STR instead of dynamic alloc for simplicity
24  */
25 struct fpgaimage {
26 	enum fmt_image	fmt_img;
27 	enum mdownload	dmethod;
28 
29 	const struct	firmware	*fw_entry;
30 
31 	/*
32 	 * the following can be read from bitstream,
33 	 * but other image format should have as well
34 	 */
35 	char	filename[MAX_STR];
36 	char	part[MAX_STR];
37 	char	date[MAX_STR];
38 	char	time[MAX_STR];
39 	int	lendata;
40 	u8	*fpgadata;
41 };
42