virtex2.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * (C) Copyright 2002
  3. * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
  4. * Keith Outwater, keith_outwater@mvis.com
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef _VIRTEX2_H_
  9. #define _VIRTEX2_H_
  10. #include <xilinx.h>
  11. /*
  12. * Slave SelectMap Implementation function table.
  13. */
  14. typedef struct {
  15. xilinx_pre_fn pre;
  16. xilinx_pgm_fn pgm;
  17. xilinx_init_fn init;
  18. xilinx_err_fn err;
  19. xilinx_done_fn done;
  20. xilinx_clk_fn clk;
  21. xilinx_cs_fn cs;
  22. xilinx_wr_fn wr;
  23. xilinx_rdata_fn rdata;
  24. xilinx_wdata_fn wdata;
  25. xilinx_busy_fn busy;
  26. xilinx_abort_fn abort;
  27. xilinx_post_fn post;
  28. } xilinx_virtex2_slave_selectmap_fns;
  29. /* Slave Serial Implementation function table */
  30. typedef struct {
  31. xilinx_pgm_fn pgm;
  32. xilinx_clk_fn clk;
  33. xilinx_rdata_fn rdata;
  34. xilinx_wdata_fn wdata;
  35. } xilinx_virtex2_slave_serial_fns;
  36. #if defined(CONFIG_FPGA_VIRTEX2)
  37. extern struct xilinx_fpga_op virtex2_op;
  38. # define FPGA_VIRTEX2_OPS &virtex2_op
  39. #else
  40. # define FPGA_VIRTEX2_OPS NULL
  41. #endif
  42. /* Device Image Sizes (in bytes)
  43. *********************************************************************/
  44. #define XILINX_XC2V40_SIZE (338208 / 8)
  45. #define XILINX_XC2V80_SIZE (597408 / 8)
  46. #define XILINX_XC2V250_SIZE (1591584 / 8)
  47. #define XILINX_XC2V500_SIZE (2557857 / 8)
  48. #define XILINX_XC2V1000_SIZE (3749408 / 8)
  49. #define XILINX_XC2V1500_SIZE (5166240 / 8)
  50. #define XILINX_XC2V2000_SIZE (6808352 / 8)
  51. #define XILINX_XC2V3000_SIZE (9589408 / 8)
  52. #define XILINX_XC2V4000_SIZE (14220192 / 8)
  53. #define XILINX_XC2V6000_SIZE (19752096 / 8)
  54. #define XILINX_XC2V8000_SIZE (26185120 / 8)
  55. #define XILINX_XC2V10000_SIZE (33519264 / 8)
  56. /* Descriptor Macros
  57. *********************************************************************/
  58. #define XILINX_XC2V40_DESC(iface, fn_table, cookie) \
  59. { xilinx_virtex2, iface, XILINX_XC2V40_SIZE, fn_table, cookie, \
  60. FPGA_VIRTEX2_OPS }
  61. #define XILINX_XC2V80_DESC(iface, fn_table, cookie) \
  62. { xilinx_virtex2, iface, XILINX_XC2V80_SIZE, fn_table, cookie, \
  63. FPGA_VIRTEX2_OPS }
  64. #define XILINX_XC2V250_DESC(iface, fn_table, cookie) \
  65. { xilinx_virtex2, iface, XILINX_XC2V250_SIZE, fn_table, cookie, \
  66. FPGA_VIRTEX2_OPS }
  67. #define XILINX_XC2V500_DESC(iface, fn_table, cookie) \
  68. { xilinx_virtex2, iface, XILINX_XC2V500_SIZE, fn_table, cookie, \
  69. FPGA_VIRTEX2_OPS }
  70. #define XILINX_XC2V1000_DESC(iface, fn_table, cookie) \
  71. { xilinx_virtex2, iface, XILINX_XC2V1000_SIZE, fn_table, cookie, \
  72. FPGA_VIRTEX2_OPS }
  73. #define XILINX_XC2V1500_DESC(iface, fn_table, cookie) \
  74. { xilinx_virtex2, iface, XILINX_XC2V1500_SIZE, fn_table, cookie, \
  75. FPGA_VIRTEX2_OPS }
  76. #define XILINX_XC2V2000_DESC(iface, fn_table, cookie) \
  77. { xilinx_virtex2, iface, XILINX_XC2V2000_SIZE, fn_table, cookie, \
  78. FPGA_VIRTEX2_OPS }
  79. #define XILINX_XC2V3000_DESC(iface, fn_table, cookie) \
  80. { xilinx_virtex2, iface, XILINX_XC2V3000_SIZE, fn_table, cookie, \
  81. FPGA_VIRTEX2_OPS }
  82. #define XILINX_XC2V4000_DESC(iface, fn_table, cookie) \
  83. { xilinx_virtex2, iface, XILINX_XC2V4000_SIZE, fn_table, cookie, \
  84. FPGA_VIRTEX2_OPS }
  85. #define XILINX_XC2V6000_DESC(iface, fn_table, cookie) \
  86. { xilinx_virtex2, iface, XILINX_XC2V6000_SIZE, fn_table, cookie, \
  87. FPGA_VIRTEX2_OPS }
  88. #define XILINX_XC2V8000_DESC(iface, fn_table, cookie) \
  89. { xilinx_virtex2, iface, XILINX_XC2V8000_SIZE, fn_table, cookie, \
  90. FPGA_VIRTEX2_OPS }
  91. #define XILINX_XC2V10000_DESC(iface, fn_table, cookie) \
  92. { xilinx_virtex2, iface, XILINX_XC2V10000_SIZE, fn_table, cookie, \
  93. FPGA_VIRTEX2_OPS }
  94. #endif /* _VIRTEX2_H_ */