gs_fpgaboot.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #include <linux/firmware.h>
  18. #define MAX_STR 256
  19. enum fmt_image {
  20. f_bit, /* only bitstream is supported */
  21. f_rbt,
  22. f_bin,
  23. f_mcs,
  24. f_hex,
  25. };
  26. enum mdownload {
  27. m_systemmap, /* only system map is supported */
  28. m_serial,
  29. m_jtag,
  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. const struct firmware *fw_entry;
  39. /*
  40. * the followings can be read from bitstream,
  41. * but other image format should have as well
  42. */
  43. char filename[MAX_STR];
  44. char part[MAX_STR];
  45. char date[MAX_STR];
  46. char time[MAX_STR];
  47. int32_t lendata;
  48. char *fpgadata;
  49. };