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