xdi_msg.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /* $Id: xdi_msg.h,v 1.1.2.2 2001/02/16 08:40:36 armin Exp $ */
  2. #ifndef __DIVA_XDI_UM_CFG_MESSAGE_H__
  3. #define __DIVA_XDI_UM_CFG_MESSAGE_H__
  4. /*
  5. Definition of messages used to communicate between
  6. XDI device driver and user mode configuration utility
  7. */
  8. /*
  9. As acknowledge one DWORD - card ordinal will be read from the card
  10. */
  11. #define DIVA_XDI_UM_CMD_GET_CARD_ORDINAL 0
  12. /*
  13. no acknowledge will be generated, memory block will be written in the
  14. memory at given offset
  15. */
  16. #define DIVA_XDI_UM_CMD_WRITE_SDRAM_BLOCK 1
  17. /*
  18. no acknowledge will be genatated, FPGA will be programmed
  19. */
  20. #define DIVA_XDI_UM_CMD_WRITE_FPGA 2
  21. /*
  22. As acknowledge block of SDRAM will be read in the user buffer
  23. */
  24. #define DIVA_XDI_UM_CMD_READ_SDRAM 3
  25. /*
  26. As acknowledge dword with serial number will be read in the user buffer
  27. */
  28. #define DIVA_XDI_UM_CMD_GET_SERIAL_NR 4
  29. /*
  30. As acknowledge struct consisting from 9 dwords with PCI info.
  31. dword[0...7] = 8 PCI BARS
  32. dword[9] = IRQ
  33. */
  34. #define DIVA_XDI_UM_CMD_GET_PCI_HW_CONFIG 5
  35. /*
  36. Reset of the board + activation of primary
  37. boot loader
  38. */
  39. #define DIVA_XDI_UM_CMD_RESET_ADAPTER 6
  40. /*
  41. Called after code download to start adapter
  42. at specified address
  43. Start does set new set of features due to fact that we not know
  44. if protocol features have changed
  45. */
  46. #define DIVA_XDI_UM_CMD_START_ADAPTER 7
  47. /*
  48. Stop adapter, called if user
  49. wishes to stop adapter without unload
  50. of the driver, to reload adapter with
  51. different protocol
  52. */
  53. #define DIVA_XDI_UM_CMD_STOP_ADAPTER 8
  54. /*
  55. Get state of current adapter
  56. Acknowledge is one dword with following values:
  57. 0 - adapter ready for download
  58. 1 - adapter running
  59. 2 - adapter dead
  60. 3 - out of service, driver should be restarted or hardware problem
  61. */
  62. #define DIVA_XDI_UM_CMD_GET_CARD_STATE 9
  63. /*
  64. Reads XLOG entry from the card
  65. */
  66. #define DIVA_XDI_UM_CMD_READ_XLOG_ENTRY 10
  67. /*
  68. Set untranslated protocol code features
  69. */
  70. #define DIVA_XDI_UM_CMD_SET_PROTOCOL_FEATURES 11
  71. typedef struct _diva_xdi_um_cfg_cmd_data_set_features {
  72. dword features;
  73. } diva_xdi_um_cfg_cmd_data_set_features_t;
  74. typedef struct _diva_xdi_um_cfg_cmd_data_start {
  75. dword offset;
  76. dword features;
  77. } diva_xdi_um_cfg_cmd_data_start_t;
  78. typedef struct _diva_xdi_um_cfg_cmd_data_write_sdram {
  79. dword ram_number;
  80. dword offset;
  81. dword length;
  82. } diva_xdi_um_cfg_cmd_data_write_sdram_t;
  83. typedef struct _diva_xdi_um_cfg_cmd_data_write_fpga {
  84. dword fpga_number;
  85. dword image_length;
  86. } diva_xdi_um_cfg_cmd_data_write_fpga_t;
  87. typedef struct _diva_xdi_um_cfg_cmd_data_read_sdram {
  88. dword ram_number;
  89. dword offset;
  90. dword length;
  91. } diva_xdi_um_cfg_cmd_data_read_sdram_t;
  92. typedef union _diva_xdi_um_cfg_cmd_data {
  93. diva_xdi_um_cfg_cmd_data_write_sdram_t write_sdram;
  94. diva_xdi_um_cfg_cmd_data_write_fpga_t write_fpga;
  95. diva_xdi_um_cfg_cmd_data_read_sdram_t read_sdram;
  96. diva_xdi_um_cfg_cmd_data_start_t start;
  97. diva_xdi_um_cfg_cmd_data_set_features_t features;
  98. } diva_xdi_um_cfg_cmd_data_t;
  99. typedef struct _diva_xdi_um_cfg_cmd {
  100. dword adapter; /* Adapter number 1...N */
  101. dword command;
  102. diva_xdi_um_cfg_cmd_data_t command_data;
  103. dword data_length; /* Plain binary data will follow */
  104. } diva_xdi_um_cfg_cmd_t;
  105. #endif