xref: /onnv-gate/usr/src/uts/common/io/e1000g/e1000_nvm.h (revision 11020:e0feef27b61a)
1 /*
2  * This file is provided under a CDDLv1 license.  When using or
3  * redistributing this file, you may do so under this license.
4  * In redistributing this file this license must be included
5  * and no other modification of this header file is permitted.
6  *
7  * CDDL LICENSE SUMMARY
8  *
9  * Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
10  *
11  * The contents of this file are subject to the terms of Version
12  * 1.0 of the Common Development and Distribution License (the "License").
13  *
14  * You should have received a copy of the License with this software.
15  * You can obtain a copy of the License at
16  *	http://www.opensolaris.org/os/licensing.
17  * See the License for the specific language governing permissions
18  * and limitations under the License.
19  */
20 
21 /*
22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms of the CDDLv1.
24  */
25 
26 /*
27  * IntelVersion: 1.18 v3-1-10-1_2009-9-18_Release14-6
28  */
29 #ifndef _E1000_NVM_H_
30 #define	_E1000_NVM_H_
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 void e1000_init_nvm_ops_generic(struct e1000_hw *hw);
37 s32 e1000_null_read_nvm(struct e1000_hw *hw, u16 a, u16 b, u16 *c);
38 void e1000_null_nvm_generic(struct e1000_hw *hw);
39 s32 e1000_null_led_default(struct e1000_hw *hw, u16 *data);
40 s32 e1000_null_write_nvm(struct e1000_hw *hw, u16 a, u16 b, u16 *c);
41 s32 e1000_acquire_nvm_generic(struct e1000_hw *hw);
42 
43 s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int ee_reg);
44 s32 e1000_read_mac_addr_generic(struct e1000_hw *hw);
45 s32 e1000_read_pba_num_generic(struct e1000_hw *hw, u32 *pba_num);
46 s32 e1000_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
47 s32 e1000_read_nvm_microwire(struct e1000_hw *hw, u16 offset,
48     u16 words, u16 *data);
49 s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
50 s32 e1000_valid_led_default_generic(struct e1000_hw *hw, u16 *data);
51 s32 e1000_validate_nvm_checksum_generic(struct e1000_hw *hw);
52 s32 e1000_write_nvm_eewr(struct e1000_hw *hw, u16 offset,
53     u16 words, u16 *data);
54 s32 e1000_write_nvm_microwire(struct e1000_hw *hw, u16 offset,
55     u16 words, u16 *data);
56 s32 e1000_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
57 s32 e1000_update_nvm_checksum_generic(struct e1000_hw *hw);
58 void e1000_stop_nvm(struct e1000_hw *hw);
59 void e1000_release_nvm_generic(struct e1000_hw *hw);
60 
61 #define	E1000_STM_OPCODE	0xDB00
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif	/* _E1000_NVM_H_ */
68