]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/net/ethernet/myricom/myri10ge/myri10ge_mcp_gen_header.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / myricom / myri10ge / myri10ge_mcp_gen_header.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
0da34b6d
BG
2#ifndef __MYRI10GE_MCP_GEN_HEADER_H__
3#define __MYRI10GE_MCP_GEN_HEADER_H__
4
0da34b6d
BG
5
6#define MCP_HEADER_PTR_OFFSET 0x3c
7
8#define MCP_TYPE_MX 0x4d582020 /* "MX " */
9#define MCP_TYPE_PCIE 0x70636965 /* "PCIE" pcie-only MCP */
10#define MCP_TYPE_ETH 0x45544820 /* "ETH " */
11#define MCP_TYPE_MCP0 0x4d435030 /* "MCP0" */
0f7229dd 12#define MCP_TYPE_DFLT 0x20202020 /* " " */
7f649269 13#define MCP_TYPE_ETHZ 0x4554485a /* "ETHZ" */
0da34b6d
BG
14
15struct mcp_gen_header {
16 /* the first 4 fields are filled at compile time */
17 unsigned header_length;
40f6cff5 18 __be32 mcp_type;
0da34b6d 19 char version[128];
0f7229dd 20 unsigned mcp_private; /* pointer to mcp-type specific structure */
0da34b6d
BG
21
22 /* filled by the MCP at run-time */
23 unsigned sram_size;
24 unsigned string_specs; /* either the original STRING_SPECS or a superset */
25 unsigned string_specs_len;
26
27 /* Fields above this comment are guaranteed to be present.
6ed14254 28 *
0da34b6d
BG
29 * Fields below this comment are extensions added in later versions
30 * of this struct, drivers should compare the header_length against
48fc7f7e 31 * offsetof(field) to check whether a given MCP implements them.
6ed14254 32 *
0da34b6d
BG
33 * Never remove any field. Keep everything naturally align.
34 */
0f7229dd
BG
35
36 /* Specifies if the running mcp is mcp0, 1, or 2. */
37 unsigned char mcp_index;
38 unsigned char disable_rabbit;
39 unsigned char unaligned_tlp;
6a4c4ad2 40 unsigned char pcie_link_algo;
0f7229dd
BG
41 unsigned counters_addr;
42 unsigned copy_block_info; /* for small mcps loaded with "lload -d" */
43 unsigned short handoff_id_major; /* must be equal */
44 unsigned short handoff_id_caps; /* bitfield: new mcp must have superset */
45 unsigned msix_table_addr; /* start address of msix table in firmware */
2c62ad7b 46 unsigned bss_addr; /* start of bss */
e92df282 47 unsigned features;
7f649269 48 unsigned ee_hdr_addr;
5dcd8467
JM
49 unsigned led_pattern;
50 unsigned led_pattern_dflt;
0f7229dd 51 /* 8 */
0da34b6d
BG
52};
53
7f649269
BG
54struct zmcp_info {
55 unsigned info_len;
56 unsigned zmcp_addr;
57 unsigned zmcp_len;
58 unsigned mcp_edata;
59};
60
0da34b6d 61#endif /* __MYRI10GE_MCP_GEN_HEADER_H__ */