xdi_msg.h 3.2 KB

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