xref: /onnv-gate/usr/src/uts/common/io/igb/igb_nvm.h (revision 12111:a462ebfcbf99)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
24  */
25 
26 /*
27  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
28  */
29 
30 /* IntelVersion: 1.18 v3_3_14_3_BHSW1 */
31 
32 #ifndef _IGB_NVM_H
33 #define	_IGB_NVM_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 void e1000_init_nvm_ops_generic(struct e1000_hw *hw);
40 s32  e1000_null_read_nvm(struct e1000_hw *hw, u16 a, u16 b, u16 *c);
41 void e1000_null_nvm_generic(struct e1000_hw *hw);
42 s32  e1000_null_led_default(struct e1000_hw *hw, u16 *data);
43 s32  e1000_null_write_nvm(struct e1000_hw *hw, u16 a, u16 b, u16 *c);
44 s32 e1000_acquire_nvm_generic(struct e1000_hw *hw);
45 
46 s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg);
47 s32 e1000_read_mac_addr_generic(struct e1000_hw *hw);
48 s32 e1000_read_pba_num_generic(struct e1000_hw *hw, u32 *pba_num);
49 s32 e1000_read_nvm_microwire(struct e1000_hw *hw, u16 offset,
50     u16 words, u16 *data);
51 s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words,
52     u16 *data);
53 s32 e1000_valid_led_default_generic(struct e1000_hw *hw, u16 *data);
54 s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw);
55 s32 e1000_write_nvm_eewr(struct e1000_hw *hw, u16 offset,
56     u16 words, u16 *data);
57 s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset,
58     u16 words, u16 *data);
59 s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words,
60     u16 *data);
61 s32 e1000_update_nvm_checksum_generic(struct e1000_hw *hw);
62 void e1000_release_nvm_generic(struct e1000_hw *hw);
63 
64 #define	E1000_STM_OPCODE	0xDB00
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif	/* _IGB_NVM_H */
71