Insop Song | e7185c69 | 2014-01-20 23:47:06 -0800 | [diff] [blame] | 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 |
Insop Song | e7185c69 | 2014-01-20 23:47:06 -0800 | [diff] [blame] | 10 | * GNU General Public License for more details. |
Insop Song | e7185c69 | 2014-01-20 23:47:06 -0800 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <linux/firmware.h> |
| 14 | |
| 15 | #define MAX_STR 256 |
| 16 | |
| 17 | enum fmt_image { |
| 18 | f_bit, /* only bitstream is supported */ |
| 19 | f_rbt, |
| 20 | f_bin, |
| 21 | f_mcs, |
| 22 | f_hex, |
| 23 | }; |
| 24 | |
| 25 | enum 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 | */ |
| 35 | struct 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 Bankar | c70aa60 | 2016-03-13 16:41:23 +0530 | [diff] [blame] | 49 | int lendata; |
Insop Song | e7185c69 | 2014-01-20 23:47:06 -0800 | [diff] [blame] | 50 | char *fpgadata; |
| 51 | }; |