xref: /dpdk/drivers/net/ngbe/base/ngbe_eeprom.h (revision 91e64c0e5d7ee7eaf39df9510bfc60bbcae14ca9)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3  * Copyright(c) 2010-2017 Intel Corporation
4  */
5 
6 #ifndef _NGBE_EEPROM_H_
7 #define _NGBE_EEPROM_H_
8 
9 #define NGBE_EEPROM_VERSION_L          0x1D
10 #define NGBE_EEPROM_VERSION_H          0x1E
11 #define NGBE_CALSUM_CAP_STATUS         0x10224
12 #define NGBE_EEPROM_VERSION_STORE_REG  0x1022C
13 
14 #define NGBE_FW_SUPPORT_LLDP		0x19
15 #define NGBE_FW_GET_LLDP		0x1B
16 #define NGBE_FW_MASK			0xFF
17 
18 s32 ngbe_init_eeprom_params(struct ngbe_hw *hw);
19 s32 ngbe_validate_eeprom_checksum_em(struct ngbe_hw *hw, u16 *checksum_val);
20 s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw);
21 void ngbe_release_eeprom_semaphore(struct ngbe_hw *hw);
22 s32 ngbe_save_eeprom_version(struct ngbe_hw *hw);
23 
24 s32 ngbe_ee_readw_buffer(struct ngbe_hw *hw, u32 offset, u32 words,
25 				void *data);
26 s32 ngbe_ee_read32(struct ngbe_hw *hw, u32 addr, u32 *data);
27 
28 s32 ngbe_ee_writew_buffer(struct ngbe_hw *hw, u32 offset, u32 words,
29 				void *data);
30 
31 #endif /* _NGBE_EEPROM_H_ */
32