1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3 * Copyright(c) 2010-2017 Intel Corporation
11 #define NGBE_PMMBX_QSIZE 64 /* Num of dwords in range */
12 #define NGBE_PMMBX_BSIZE (NGBE_PMMBX_QSIZE * 4)
13 #define NGBE_PMMBX_DATA_SIZE (NGBE_PMMBX_BSIZE - FW_NVM_DATA_OFFSET * 4)
14 #define NGBE_HI_COMMAND_TIMEOUT 5000 /* Process HI command limit */
17 #define FW_CEM_MAX_RETRIES 3
18 #define FW_CEM_RESP_STATUS_SUCCESS 0x1
19 #define FW_READ_SHADOW_RAM_CMD 0x31
20 #define FW_READ_SHADOW_RAM_LEN 0x6
21 #define FW_DEFAULT_CHECKSUM 0xFF /* checksum always 0xFF */
22 #define FW_NVM_DATA_OFFSET 3
23 #define FW_EEPROM_CHECK_STATUS 0xE9
25 #define FW_CHECKSUM_CAP_ST_PASS 0x80658383
26 #define FW_CHECKSUM_CAP_ST_FAIL 0x70657376
28 /* Host Interface Command Structures */
39 struct ngbe_hic_hdr2_req {
46 struct ngbe_hic_hdr2_rsp {
49 u8 ret_status; /* 7-5: high bits of buf_len, 4-0: status */
54 struct ngbe_hic_hdr2_req req;
55 struct ngbe_hic_hdr2_rsp rsp;
58 /* These need to be dword aligned */
59 struct ngbe_hic_read_shadow_ram {
60 union ngbe_hic_hdr2 hdr;
68 s32 ngbe_hic_sr_read(struct ngbe_hw *hw, u32 addr, u8 *buf, int len);
69 s32 ngbe_hic_check_cap(struct ngbe_hw *hw);
70 #endif /* _NGBE_MNG_H_ */