1ae06c70bSJeff Kirsher /* SPDX-License-Identifier: GPL-2.0 */
2e78b80b1SDavid Ertman /* Intel PRO/1000 Linux driver
3529498cdSYanir Lubetkin  * Copyright(c) 1999 - 2015 Intel Corporation.
4e78b80b1SDavid Ertman  *
5e78b80b1SDavid Ertman  * This program is free software; you can redistribute it and/or modify it
6e78b80b1SDavid Ertman  * under the terms and conditions of the GNU General Public License,
7e78b80b1SDavid Ertman  * version 2, as published by the Free Software Foundation.
8e78b80b1SDavid Ertman  *
9e78b80b1SDavid Ertman  * This program is distributed in the hope it will be useful, but WITHOUT
10e78b80b1SDavid Ertman  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11e78b80b1SDavid Ertman  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12e78b80b1SDavid Ertman  * more details.
13e78b80b1SDavid Ertman  *
14e78b80b1SDavid Ertman  * The full GNU General Public License is included in this distribution in
15e78b80b1SDavid Ertman  * the file called "COPYING".
16e78b80b1SDavid Ertman  *
17e78b80b1SDavid Ertman  * Contact Information:
18e78b80b1SDavid Ertman  * Linux NICS <linux.nics@intel.com>
19e78b80b1SDavid Ertman  * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
20e78b80b1SDavid Ertman  * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
21e78b80b1SDavid Ertman  */
22f25701dfSBruce Allan 
23f25701dfSBruce Allan #ifndef _E1000E_82571_H_
24f25701dfSBruce Allan #define _E1000E_82571_H_
25f25701dfSBruce Allan 
26f25701dfSBruce Allan #define ID_LED_RESERVED_F746	0xF746
27f25701dfSBruce Allan #define ID_LED_DEFAULT_82573	((ID_LED_DEF1_DEF2 << 12) | \
28f25701dfSBruce Allan 				 (ID_LED_OFF1_ON2  <<  8) | \
29f25701dfSBruce Allan 				 (ID_LED_DEF1_DEF2 <<  4) | \
30f25701dfSBruce Allan 				 (ID_LED_DEF1_DEF2))
31f25701dfSBruce Allan 
32f25701dfSBruce Allan #define E1000_GCR_L1_ACT_WITHOUT_L0S_RX	0x08000000
33f25701dfSBruce Allan #define AN_RETRY_COUNT		5	/* Autoneg Retry Count value */
34f25701dfSBruce Allan 
35f25701dfSBruce Allan /* Intr Throttling - RW */
36f25701dfSBruce Allan #define E1000_EITR_82574(_n)	(0x000E8 + (0x4 * (_n)))
37f25701dfSBruce Allan 
38f25701dfSBruce Allan #define E1000_EIAC_82574	0x000DC	/* Ext. Interrupt Auto Clear - RW */
39f25701dfSBruce Allan #define E1000_EIAC_MASK_82574	0x01F00000
40f25701dfSBruce Allan 
413ffcf2cbSBruce Allan #define E1000_IVAR_INT_ALLOC_VALID	0x8
423ffcf2cbSBruce Allan 
43f25701dfSBruce Allan /* Manageability Operation Mode mask */
44f25701dfSBruce Allan #define E1000_NVM_INIT_CTRL2_MNGM	0x6000
45f25701dfSBruce Allan 
46f25701dfSBruce Allan #define E1000_BASE1000T_STATUS		10
47f25701dfSBruce Allan #define E1000_IDLE_ERROR_COUNT_MASK	0xFF
48f25701dfSBruce Allan #define E1000_RECEIVE_ERROR_COUNTER	21
49f25701dfSBruce Allan #define E1000_RECEIVE_ERROR_MAX		0xFFFF
50f25701dfSBruce Allan bool e1000_check_phy_82574(struct e1000_hw *hw);
51f25701dfSBruce Allan bool e1000e_get_laa_state_82571(struct e1000_hw *hw);
52f25701dfSBruce Allan void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state);
53f25701dfSBruce Allan 
54f25701dfSBruce Allan #endif
55