aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2013-01-22 03:44:04 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-02-05 02:24:41 -0500
commitf25701df2ef171894730534e5b557186d2bacf17 (patch)
tree739771d237ea35b527031c3066babf5d099afa95
parent27000929ef0f137b34ba219eb04b05e772eff2b1 (diff)
e1000e: cosmetic move of #defines and prototypes to the new 82571.h
Move #defines and function prototypes specific to the 8257x family of devices (82571, 82572, 82573, 82574, 82583) to the new 82571.h header file (the convention for Intel wired ethernet drivers is to use the name of the first device in the family for related file and function names). These defines and function prototypes can be used by other files in the driver and moving them to the 8257x-family-specific file makes it clearer to which devices they are applicable. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/e1000e/82571.c15
-rw-r--r--drivers/net/ethernet/intel/e1000e/82571.h58
-rw-r--r--drivers/net/ethernet/intel/e1000e/defines.h2
-rw-r--r--drivers/net/ethernet/intel/e1000e/e1000.h4
-rw-r--r--drivers/net/ethernet/intel/e1000e/hw.h5
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c1
6 files changed, 60 insertions, 25 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c
index cf86090edd3b..1db7e3df43ea 100644
--- a/drivers/net/ethernet/intel/e1000e/82571.c
+++ b/drivers/net/ethernet/intel/e1000e/82571.c
@@ -44,21 +44,6 @@
44 44
45#include "e1000.h" 45#include "e1000.h"
46 46
47#define ID_LED_RESERVED_F746 0xF746
48#define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \
49 (ID_LED_OFF1_ON2 << 8) | \
50 (ID_LED_DEF1_DEF2 << 4) | \
51 (ID_LED_DEF1_DEF2))
52
53#define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000
54#define AN_RETRY_COUNT 5 /* Autoneg Retry Count value */
55#define E1000_BASE1000T_STATUS 10
56#define E1000_IDLE_ERROR_COUNT_MASK 0xFF
57#define E1000_RECEIVE_ERROR_COUNTER 21
58#define E1000_RECEIVE_ERROR_MAX 0xFFFF
59
60#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */
61
62static s32 e1000_get_phy_id_82571(struct e1000_hw *hw); 47static s32 e1000_get_phy_id_82571(struct e1000_hw *hw);
63static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw); 48static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw);
64static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw); 49static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw);
diff --git a/drivers/net/ethernet/intel/e1000e/82571.h b/drivers/net/ethernet/intel/e1000e/82571.h
new file mode 100644
index 000000000000..85cb1a3b7cd4
--- /dev/null
+++ b/drivers/net/ethernet/intel/e1000e/82571.h
@@ -0,0 +1,58 @@
1/*******************************************************************************
2
3 Intel PRO/1000 Linux driver
4 Copyright(c) 1999 - 2013 Intel Corporation.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License,
8 version 2, as published by the Free Software Foundation.
9
10 This program is distributed in the hope it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 more details.
14
15 You should have received a copy of the GNU General Public License along with
16 this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18
19 The full GNU General Public License is included in this distribution in
20 the file called "COPYING".
21
22 Contact Information:
23 Linux NICS <linux.nics@intel.com>
24 e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
25 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
26
27*******************************************************************************/
28
29#ifndef _E1000E_82571_H_
30#define _E1000E_82571_H_
31
32#define ID_LED_RESERVED_F746 0xF746
33#define ID_LED_DEFAULT_82573 ((ID_LED_DEF1_DEF2 << 12) | \
34 (ID_LED_OFF1_ON2 << 8) | \
35 (ID_LED_DEF1_DEF2 << 4) | \
36 (ID_LED_DEF1_DEF2))
37
38#define E1000_GCR_L1_ACT_WITHOUT_L0S_RX 0x08000000
39#define AN_RETRY_COUNT 5 /* Autoneg Retry Count value */
40
41/* Intr Throttling - RW */
42#define E1000_EITR_82574(_n) (0x000E8 + (0x4 * (_n)))
43
44#define E1000_EIAC_82574 0x000DC /* Ext. Interrupt Auto Clear - RW */
45#define E1000_EIAC_MASK_82574 0x01F00000
46
47/* Manageability Operation Mode mask */
48#define E1000_NVM_INIT_CTRL2_MNGM 0x6000
49
50#define E1000_BASE1000T_STATUS 10
51#define E1000_IDLE_ERROR_COUNT_MASK 0xFF
52#define E1000_RECEIVE_ERROR_COUNTER 21
53#define E1000_RECEIVE_ERROR_MAX 0xFFFF
54bool e1000_check_phy_82574(struct e1000_hw *hw);
55bool e1000e_get_laa_state_82571(struct e1000_hw *hw);
56void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state);
57
58#endif
diff --git a/drivers/net/ethernet/intel/e1000e/defines.h b/drivers/net/ethernet/intel/e1000e/defines.h
index 615b900c0152..b425544144ec 100644
--- a/drivers/net/ethernet/intel/e1000e/defines.h
+++ b/drivers/net/ethernet/intel/e1000e/defines.h
@@ -606,8 +606,6 @@
606#define NVM_ALT_MAC_ADDR_PTR 0x0037 606#define NVM_ALT_MAC_ADDR_PTR 0x0037
607#define NVM_CHECKSUM_REG 0x003F 607#define NVM_CHECKSUM_REG 0x003F
608 608
609#define E1000_NVM_INIT_CTRL2_MNGM 0x6000 /* Manageability Operation Mode mask */
610
611#define E1000_NVM_CFG_DONE_PORT_0 0x40000 /* MNG config cycle done */ 609#define E1000_NVM_CFG_DONE_PORT_0 0x40000 /* MNG config cycle done */
612#define E1000_NVM_CFG_DONE_PORT_1 0x80000 /* ...for second port */ 610#define E1000_NVM_CFG_DONE_PORT_1 0x80000 /* ...for second port */
613 611
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 4b0bd9c225cc..12c5d4043505 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -579,9 +579,6 @@ extern s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
579 579
580extern bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw); 580extern bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw);
581 581
582extern bool e1000e_get_laa_state_82571(struct e1000_hw *hw);
583extern void e1000e_set_laa_state_82571(struct e1000_hw *hw, bool state);
584
585extern void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw); 582extern void e1000e_write_protect_nvm_ich8lan(struct e1000_hw *hw);
586extern void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw, 583extern void e1000e_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
587 bool state); 584 bool state);
@@ -703,7 +700,6 @@ extern s32 e1000_get_phy_info_ife(struct e1000_hw *hw);
703extern s32 e1000_check_polarity_ife(struct e1000_hw *hw); 700extern s32 e1000_check_polarity_ife(struct e1000_hw *hw);
704extern s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw); 701extern s32 e1000_phy_force_speed_duplex_ife(struct e1000_hw *hw);
705extern s32 e1000_check_polarity_igp(struct e1000_hw *hw); 702extern s32 e1000_check_polarity_igp(struct e1000_hw *hw);
706extern bool e1000_check_phy_82574(struct e1000_hw *hw);
707extern s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data); 703extern s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
708extern void e1000e_ptp_init(struct e1000_adapter *adapter); 704extern void e1000e_ptp_init(struct e1000_adapter *adapter);
709extern void e1000e_ptp_remove(struct e1000_adapter *adapter); 705extern void e1000e_ptp_remove(struct e1000_adapter *adapter);
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index f32b19af9a72..6f94437d8c0e 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -54,12 +54,9 @@ enum e1e_registers {
54 E1000_ICS = 0x000C8, /* Interrupt Cause Set - WO */ 54 E1000_ICS = 0x000C8, /* Interrupt Cause Set - WO */
55 E1000_IMS = 0x000D0, /* Interrupt Mask Set - RW */ 55 E1000_IMS = 0x000D0, /* Interrupt Mask Set - RW */
56 E1000_IMC = 0x000D8, /* Interrupt Mask Clear - WO */ 56 E1000_IMC = 0x000D8, /* Interrupt Mask Clear - WO */
57 E1000_EIAC_82574 = 0x000DC, /* Ext. Interrupt Auto Clear - RW */
58 E1000_IAM = 0x000E0, /* Interrupt Acknowledge Auto Mask */ 57 E1000_IAM = 0x000E0, /* Interrupt Acknowledge Auto Mask */
59 E1000_IVAR = 0x000E4, /* Interrupt Vector Allocation - RW */ 58 E1000_IVAR = 0x000E4, /* Interrupt Vector Allocation - RW */
60 E1000_FEXTNVM7 = 0x000E4, /* Future Extended NVM 7 - RW */ 59 E1000_FEXTNVM7 = 0x000E4, /* Future Extended NVM 7 - RW */
61 E1000_EITR_82574_BASE = 0x000E8, /* Interrupt Throttling - RW */
62#define E1000_EITR_82574(_n) (E1000_EITR_82574_BASE + (_n << 2))
63 E1000_LPIC = 0x000FC, /* Low Power Idle Control - RW */ 60 E1000_LPIC = 0x000FC, /* Low Power Idle Control - RW */
64 E1000_RCTL = 0x00100, /* Rx Control - RW */ 61 E1000_RCTL = 0x00100, /* Rx Control - RW */
65 E1000_FCTTV = 0x00170, /* Flow Control Transmit Timer Value - RW */ 62 E1000_FCTTV = 0x00170, /* Flow Control Transmit Timer Value - RW */
@@ -1005,4 +1002,6 @@ struct e1000_hw {
1005 } dev_spec; 1002 } dev_spec;
1006}; 1003};
1007 1004
1005#include "82571.h"
1006
1008#endif 1007#endif
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index e0eb5dddf3ea..6fcf9e8008c0 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -2024,7 +2024,6 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
2024 ctrl_ext |= E1000_CTRL_EXT_PBA_CLR; 2024 ctrl_ext |= E1000_CTRL_EXT_PBA_CLR;
2025 2025
2026 /* Auto-Mask Other interrupts upon ICR read */ 2026 /* Auto-Mask Other interrupts upon ICR read */
2027#define E1000_EIAC_MASK_82574 0x01F00000
2028 ew32(IAM, ~E1000_EIAC_MASK_82574 | E1000_IMS_OTHER); 2027 ew32(IAM, ~E1000_EIAC_MASK_82574 | E1000_IMS_OTHER);
2029 ctrl_ext |= E1000_CTRL_EXT_EIAME; 2028 ctrl_ext |= E1000_CTRL_EXT_EIAME;
2030 ew32(CTRL_EXT, ctrl_ext); 2029 ew32(CTRL_EXT, ctrl_ext);