aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-08-15 02:00:10 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-19 17:44:28 -0400
commite4c780b1ffc7d7bc27b7dc57fcf17ebb8d3006bc (patch)
tree5d7858b0067f56d3584c1ff572211edd106f74c0
parent3418e469ebaebec16f7df83074087eb901fb76b9 (diff)
[PATCH] drivers/net/e1000/: possible cleanups
- make needlessly global functions static - #if 0 the following unused global functions: - e1000_hw.c: e1000_mc_addr_list_update() - e1000_hw.c: e1000_read_reg_io() - e1000_hw.c: e1000_enable_pciex_master() - e1000_hw.c: e1000_ife_disable_dynamic_power_down() - e1000_hw.c: e1000_ife_enable_dynamic_power_down() - e1000_hw.c: e1000_write_ich8_word() - e1000_hw.c: e1000_duplex_reversal() - e1000_main.c: e1000_io_read() Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: John Ronciak <john.ronciak@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/e1000/e1000_hw.c89
-rw-r--r--drivers/net/e1000/e1000_hw.h32
-rw-r--r--drivers/net/e1000/e1000_main.c2
3 files changed, 67 insertions, 56 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 583518ae49ce..b3b919116e0f 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -105,6 +105,33 @@ static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw,
105 uint16_t duplex); 105 uint16_t duplex);
106static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); 106static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw);
107 107
108static int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw,
109 uint32_t segment);
110static int32_t e1000_get_software_flag(struct e1000_hw *hw);
111static int32_t e1000_get_software_semaphore(struct e1000_hw *hw);
112static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
113static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
114static int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
115 uint16_t words, uint16_t *data);
116static int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index,
117 uint8_t* data);
118static int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index,
119 uint16_t *data);
120static int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr,
121 uint16_t *data);
122static void e1000_release_software_flag(struct e1000_hw *hw);
123static void e1000_release_software_semaphore(struct e1000_hw *hw);
124static int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw,
125 uint32_t no_snoop);
126static int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw,
127 uint32_t index, uint8_t byte);
128static int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
129 uint16_t words, uint16_t *data);
130static int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index,
131 uint8_t data);
132static int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr,
133 uint16_t data);
134
108/* IGP cable length table */ 135/* IGP cable length table */
109static const 136static const
110uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] = 137uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] =
@@ -3233,7 +3260,7 @@ e1000_shift_in_mdi_bits(struct e1000_hw *hw)
3233 return data; 3260 return data;
3234} 3261}
3235 3262
3236int32_t 3263static int32_t
3237e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) 3264e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
3238{ 3265{
3239 uint32_t swfw_sync = 0; 3266 uint32_t swfw_sync = 0;
@@ -3277,7 +3304,7 @@ e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
3277 return E1000_SUCCESS; 3304 return E1000_SUCCESS;
3278} 3305}
3279 3306
3280void 3307static void
3281e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) 3308e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask)
3282{ 3309{
3283 uint32_t swfw_sync; 3310 uint32_t swfw_sync;
@@ -3575,7 +3602,7 @@ e1000_write_phy_reg_ex(struct e1000_hw *hw,
3575 return E1000_SUCCESS; 3602 return E1000_SUCCESS;
3576} 3603}
3577 3604
3578int32_t 3605static int32_t
3579e1000_read_kmrn_reg(struct e1000_hw *hw, 3606e1000_read_kmrn_reg(struct e1000_hw *hw,
3580 uint32_t reg_addr, 3607 uint32_t reg_addr,
3581 uint16_t *data) 3608 uint16_t *data)
@@ -3608,7 +3635,7 @@ e1000_read_kmrn_reg(struct e1000_hw *hw,
3608 return E1000_SUCCESS; 3635 return E1000_SUCCESS;
3609} 3636}
3610 3637
3611int32_t 3638static int32_t
3612e1000_write_kmrn_reg(struct e1000_hw *hw, 3639e1000_write_kmrn_reg(struct e1000_hw *hw,
3613 uint32_t reg_addr, 3640 uint32_t reg_addr,
3614 uint16_t data) 3641 uint16_t data)
@@ -3839,7 +3866,7 @@ e1000_phy_powerdown_workaround(struct e1000_hw *hw)
3839* 3866*
3840* hw - struct containing variables accessed by shared code 3867* hw - struct containing variables accessed by shared code
3841******************************************************************************/ 3868******************************************************************************/
3842int32_t 3869static int32_t
3843e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) 3870e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw)
3844{ 3871{
3845 int32_t ret_val; 3872 int32_t ret_val;
@@ -4086,7 +4113,7 @@ e1000_phy_igp_get_info(struct e1000_hw *hw,
4086* hw - Struct containing variables accessed by shared code 4113* hw - Struct containing variables accessed by shared code
4087* phy_info - PHY information structure 4114* phy_info - PHY information structure
4088******************************************************************************/ 4115******************************************************************************/
4089int32_t 4116static int32_t
4090e1000_phy_ife_get_info(struct e1000_hw *hw, 4117e1000_phy_ife_get_info(struct e1000_hw *hw,
4091 struct e1000_phy_info *phy_info) 4118 struct e1000_phy_info *phy_info)
4092{ 4119{
@@ -5643,6 +5670,7 @@ e1000_init_rx_addrs(struct e1000_hw *hw)
5643 * for the first 15 multicast addresses, and hashes the rest into the 5670 * for the first 15 multicast addresses, and hashes the rest into the
5644 * multicast table. 5671 * multicast table.
5645 *****************************************************************************/ 5672 *****************************************************************************/
5673#if 0
5646void 5674void
5647e1000_mc_addr_list_update(struct e1000_hw *hw, 5675e1000_mc_addr_list_update(struct e1000_hw *hw,
5648 uint8_t *mc_addr_list, 5676 uint8_t *mc_addr_list,
@@ -5719,6 +5747,7 @@ e1000_mc_addr_list_update(struct e1000_hw *hw,
5719 } 5747 }
5720 DEBUGOUT("MC Update Complete\n"); 5748 DEBUGOUT("MC Update Complete\n");
5721} 5749}
5750#endif /* 0 */
5722 5751
5723/****************************************************************************** 5752/******************************************************************************
5724 * Hashes an address to determine its location in the multicast table 5753 * Hashes an address to determine its location in the multicast table
@@ -6587,6 +6616,7 @@ e1000_get_bus_info(struct e1000_hw *hw)
6587 * hw - Struct containing variables accessed by shared code 6616 * hw - Struct containing variables accessed by shared code
6588 * offset - offset to read from 6617 * offset - offset to read from
6589 *****************************************************************************/ 6618 *****************************************************************************/
6619#if 0
6590uint32_t 6620uint32_t
6591e1000_read_reg_io(struct e1000_hw *hw, 6621e1000_read_reg_io(struct e1000_hw *hw,
6592 uint32_t offset) 6622 uint32_t offset)
@@ -6597,6 +6627,7 @@ e1000_read_reg_io(struct e1000_hw *hw,
6597 e1000_io_write(hw, io_addr, offset); 6627 e1000_io_write(hw, io_addr, offset);
6598 return e1000_io_read(hw, io_data); 6628 return e1000_io_read(hw, io_data);
6599} 6629}
6630#endif /* 0 */
6600 6631
6601/****************************************************************************** 6632/******************************************************************************
6602 * Writes a value to one of the devices registers using port I/O (as opposed to 6633 * Writes a value to one of the devices registers using port I/O (as opposed to
@@ -7909,6 +7940,7 @@ e1000_set_pci_express_master_disable(struct e1000_hw *hw)
7909 * returns: - none. 7940 * returns: - none.
7910 * 7941 *
7911 ***************************************************************************/ 7942 ***************************************************************************/
7943#if 0
7912void 7944void
7913e1000_enable_pciex_master(struct e1000_hw *hw) 7945e1000_enable_pciex_master(struct e1000_hw *hw)
7914{ 7946{
@@ -7923,6 +7955,7 @@ e1000_enable_pciex_master(struct e1000_hw *hw)
7923 ctrl &= ~E1000_CTRL_GIO_MASTER_DISABLE; 7955 ctrl &= ~E1000_CTRL_GIO_MASTER_DISABLE;
7924 E1000_WRITE_REG(hw, CTRL, ctrl); 7956 E1000_WRITE_REG(hw, CTRL, ctrl);
7925} 7957}
7958#endif /* 0 */
7926 7959
7927/******************************************************************************* 7960/*******************************************************************************
7928 * 7961 *
@@ -8148,7 +8181,7 @@ e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw)
8148 * E1000_SUCCESS at any other case. 8181 * E1000_SUCCESS at any other case.
8149 * 8182 *
8150 ***************************************************************************/ 8183 ***************************************************************************/
8151int32_t 8184static int32_t
8152e1000_get_software_semaphore(struct e1000_hw *hw) 8185e1000_get_software_semaphore(struct e1000_hw *hw)
8153{ 8186{
8154 int32_t timeout = hw->eeprom.word_size + 1; 8187 int32_t timeout = hw->eeprom.word_size + 1;
@@ -8183,7 +8216,7 @@ e1000_get_software_semaphore(struct e1000_hw *hw)
8183 * hw: Struct containing variables accessed by shared code 8216 * hw: Struct containing variables accessed by shared code
8184 * 8217 *
8185 ***************************************************************************/ 8218 ***************************************************************************/
8186void 8219static void
8187e1000_release_software_semaphore(struct e1000_hw *hw) 8220e1000_release_software_semaphore(struct e1000_hw *hw)
8188{ 8221{
8189 uint32_t swsm; 8222 uint32_t swsm;
@@ -8265,7 +8298,7 @@ e1000_arc_subsystem_valid(struct e1000_hw *hw)
8265 * returns: E1000_SUCCESS 8298 * returns: E1000_SUCCESS
8266 * 8299 *
8267 *****************************************************************************/ 8300 *****************************************************************************/
8268int32_t 8301static int32_t
8269e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop) 8302e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop)
8270{ 8303{
8271 uint32_t gcr_reg = 0; 8304 uint32_t gcr_reg = 0;
@@ -8306,7 +8339,7 @@ e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop)
8306 * hw: Struct containing variables accessed by shared code 8339 * hw: Struct containing variables accessed by shared code
8307 * 8340 *
8308 ***************************************************************************/ 8341 ***************************************************************************/
8309int32_t 8342static int32_t
8310e1000_get_software_flag(struct e1000_hw *hw) 8343e1000_get_software_flag(struct e1000_hw *hw)
8311{ 8344{
8312 int32_t timeout = PHY_CFG_TIMEOUT; 8345 int32_t timeout = PHY_CFG_TIMEOUT;
@@ -8345,7 +8378,7 @@ e1000_get_software_flag(struct e1000_hw *hw)
8345 * hw: Struct containing variables accessed by shared code 8378 * hw: Struct containing variables accessed by shared code
8346 * 8379 *
8347 ***************************************************************************/ 8380 ***************************************************************************/
8348void 8381static void
8349e1000_release_software_flag(struct e1000_hw *hw) 8382e1000_release_software_flag(struct e1000_hw *hw)
8350{ 8383{
8351 uint32_t extcnf_ctrl; 8384 uint32_t extcnf_ctrl;
@@ -8369,6 +8402,7 @@ e1000_release_software_flag(struct e1000_hw *hw)
8369 * hw: Struct containing variables accessed by shared code 8402 * hw: Struct containing variables accessed by shared code
8370 * 8403 *
8371 ***************************************************************************/ 8404 ***************************************************************************/
8405#if 0
8372int32_t 8406int32_t
8373e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw) 8407e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw)
8374{ 8408{
@@ -8388,6 +8422,7 @@ e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw)
8388 8422
8389 return ret_val; 8423 return ret_val;
8390} 8424}
8425#endif /* 0 */
8391 8426
8392/*************************************************************************** 8427/***************************************************************************
8393 * 8428 *
@@ -8397,6 +8432,7 @@ e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw)
8397 * hw: Struct containing variables accessed by shared code 8432 * hw: Struct containing variables accessed by shared code
8398 * 8433 *
8399 ***************************************************************************/ 8434 ***************************************************************************/
8435#if 0
8400int32_t 8436int32_t
8401e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw) 8437e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw)
8402{ 8438{
@@ -8416,6 +8452,7 @@ e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw)
8416 8452
8417 return ret_val; 8453 return ret_val;
8418} 8454}
8455#endif /* 0 */
8419 8456
8420/****************************************************************************** 8457/******************************************************************************
8421 * Reads a 16 bit word or words from the EEPROM using the ICH8's flash access 8458 * Reads a 16 bit word or words from the EEPROM using the ICH8's flash access
@@ -8426,7 +8463,7 @@ e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw)
8426 * data - word read from the EEPROM 8463 * data - word read from the EEPROM
8427 * words - number of words to read 8464 * words - number of words to read
8428 *****************************************************************************/ 8465 *****************************************************************************/
8429int32_t 8466static int32_t
8430e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, 8467e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
8431 uint16_t *data) 8468 uint16_t *data)
8432{ 8469{
@@ -8482,7 +8519,7 @@ e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
8482 * words - number of words to write 8519 * words - number of words to write
8483 * data - words to write to the EEPROM 8520 * data - words to write to the EEPROM
8484 *****************************************************************************/ 8521 *****************************************************************************/
8485int32_t 8522static int32_t
8486e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, 8523e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
8487 uint16_t *data) 8524 uint16_t *data)
8488{ 8525{
@@ -8529,7 +8566,7 @@ e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words,
8529 * 8566 *
8530 * hw - The pointer to the hw structure 8567 * hw - The pointer to the hw structure
8531 ****************************************************************************/ 8568 ****************************************************************************/
8532int32_t 8569static int32_t
8533e1000_ich8_cycle_init(struct e1000_hw *hw) 8570e1000_ich8_cycle_init(struct e1000_hw *hw)
8534{ 8571{
8535 union ich8_hws_flash_status hsfsts; 8572 union ich8_hws_flash_status hsfsts;
@@ -8596,7 +8633,7 @@ e1000_ich8_cycle_init(struct e1000_hw *hw)
8596 * 8633 *
8597 * hw - The pointer to the hw structure 8634 * hw - The pointer to the hw structure
8598 ****************************************************************************/ 8635 ****************************************************************************/
8599int32_t 8636static int32_t
8600e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout) 8637e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout)
8601{ 8638{
8602 union ich8_hws_flash_ctrl hsflctl; 8639 union ich8_hws_flash_ctrl hsflctl;
@@ -8631,7 +8668,7 @@ e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout)
8631 * size - Size of data to read, 1=byte 2=word 8668 * size - Size of data to read, 1=byte 2=word
8632 * data - Pointer to the word to store the value read. 8669 * data - Pointer to the word to store the value read.
8633 *****************************************************************************/ 8670 *****************************************************************************/
8634int32_t 8671static int32_t
8635e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, 8672e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
8636 uint32_t size, uint16_t* data) 8673 uint32_t size, uint16_t* data)
8637{ 8674{
@@ -8710,7 +8747,7 @@ e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
8710 * size - Size of data to read, 1=byte 2=word 8747 * size - Size of data to read, 1=byte 2=word
8711 * data - The byte(s) to write to the NVM. 8748 * data - The byte(s) to write to the NVM.
8712 *****************************************************************************/ 8749 *****************************************************************************/
8713int32_t 8750static int32_t
8714e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, 8751e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size,
8715 uint16_t data) 8752 uint16_t data)
8716{ 8753{
@@ -8785,7 +8822,7 @@ e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size,
8785 * index - The index of the byte to read. 8822 * index - The index of the byte to read.
8786 * data - Pointer to a byte to store the value read. 8823 * data - Pointer to a byte to store the value read.
8787 *****************************************************************************/ 8824 *****************************************************************************/
8788int32_t 8825static int32_t
8789e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data) 8826e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data)
8790{ 8827{
8791 int32_t status = E1000_SUCCESS; 8828 int32_t status = E1000_SUCCESS;
@@ -8808,7 +8845,7 @@ e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data)
8808 * index - The index of the byte to write. 8845 * index - The index of the byte to write.
8809 * byte - The byte to write to the NVM. 8846 * byte - The byte to write to the NVM.
8810 *****************************************************************************/ 8847 *****************************************************************************/
8811int32_t 8848static int32_t
8812e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte) 8849e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte)
8813{ 8850{
8814 int32_t error = E1000_SUCCESS; 8851 int32_t error = E1000_SUCCESS;
@@ -8839,7 +8876,7 @@ e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte)
8839 * index - The index of the byte to read. 8876 * index - The index of the byte to read.
8840 * data - The byte to write to the NVM. 8877 * data - The byte to write to the NVM.
8841 *****************************************************************************/ 8878 *****************************************************************************/
8842int32_t 8879static int32_t
8843e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data) 8880e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data)
8844{ 8881{
8845 int32_t status = E1000_SUCCESS; 8882 int32_t status = E1000_SUCCESS;
@@ -8857,7 +8894,7 @@ e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data)
8857 * index - The starting byte index of the word to read. 8894 * index - The starting byte index of the word to read.
8858 * data - Pointer to a word to store the value read. 8895 * data - Pointer to a word to store the value read.
8859 *****************************************************************************/ 8896 *****************************************************************************/
8860int32_t 8897static int32_t
8861e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data) 8898e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data)
8862{ 8899{
8863 int32_t status = E1000_SUCCESS; 8900 int32_t status = E1000_SUCCESS;
@@ -8872,6 +8909,7 @@ e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data)
8872 * index - The starting byte index of the word to read. 8909 * index - The starting byte index of the word to read.
8873 * data - The word to write to the NVM. 8910 * data - The word to write to the NVM.
8874 *****************************************************************************/ 8911 *****************************************************************************/
8912#if 0
8875int32_t 8913int32_t
8876e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data) 8914e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data)
8877{ 8915{
@@ -8879,6 +8917,7 @@ e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data)
8879 status = e1000_write_ich8_data(hw, index, 2, data); 8917 status = e1000_write_ich8_data(hw, index, 2, data);
8880 return status; 8918 return status;
8881} 8919}
8920#endif /* 0 */
8882 8921
8883/****************************************************************************** 8922/******************************************************************************
8884 * Erases the bank specified. Each bank is a 4k block. Segments are 0 based. 8923 * Erases the bank specified. Each bank is a 4k block. Segments are 0 based.
@@ -8887,7 +8926,7 @@ e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data)
8887 * hw - pointer to e1000_hw structure 8926 * hw - pointer to e1000_hw structure
8888 * segment - 0 for first segment, 1 for second segment, etc. 8927 * segment - 0 for first segment, 1 for second segment, etc.
8889 *****************************************************************************/ 8928 *****************************************************************************/
8890int32_t 8929static int32_t
8891e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment) 8930e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment)
8892{ 8931{
8893 union ich8_hws_flash_status hsfsts; 8932 union ich8_hws_flash_status hsfsts;
@@ -8984,6 +9023,7 @@ e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment)
8984 * hw: Struct containing variables accessed by shared code 9023 * hw: Struct containing variables accessed by shared code
8985 * 9024 *
8986 *****************************************************************************/ 9025 *****************************************************************************/
9026#if 0
8987int32_t 9027int32_t
8988e1000_duplex_reversal(struct e1000_hw *hw) 9028e1000_duplex_reversal(struct e1000_hw *hw)
8989{ 9029{
@@ -9012,8 +9052,9 @@ e1000_duplex_reversal(struct e1000_hw *hw)
9012 9052
9013 return ret_val; 9053 return ret_val;
9014} 9054}
9055#endif /* 0 */
9015 9056
9016int32_t 9057static int32_t
9017e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 9058e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw,
9018 uint32_t cnf_base_addr, uint32_t cnf_size) 9059 uint32_t cnf_base_addr, uint32_t cnf_size)
9019{ 9060{
@@ -9047,7 +9088,7 @@ e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw,
9047} 9088}
9048 9089
9049 9090
9050int32_t 9091static int32_t
9051e1000_init_lcd_from_nvm(struct e1000_hw *hw) 9092e1000_init_lcd_from_nvm(struct e1000_hw *hw)
9052{ 9093{
9053 uint32_t reg_data, cnf_base_addr, cnf_size, ret_val, loop; 9094 uint32_t reg_data, cnf_base_addr, cnf_size, ret_val, loop;
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index f9341e3276b3..375b95518c31 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -323,13 +323,8 @@ int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t dat
323int32_t e1000_phy_hw_reset(struct e1000_hw *hw); 323int32_t e1000_phy_hw_reset(struct e1000_hw *hw);
324int32_t e1000_phy_reset(struct e1000_hw *hw); 324int32_t e1000_phy_reset(struct e1000_hw *hw);
325void e1000_phy_powerdown_workaround(struct e1000_hw *hw); 325void e1000_phy_powerdown_workaround(struct e1000_hw *hw);
326int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw);
327int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, uint32_t cnf_base_addr, uint32_t cnf_size);
328int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw);
329int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 326int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info);
330int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); 327int32_t e1000_validate_mdi_setting(struct e1000_hw *hw);
331int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data);
332int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data);
333 328
334/* EEPROM Functions */ 329/* EEPROM Functions */
335int32_t e1000_init_eeprom_params(struct e1000_hw *hw); 330int32_t e1000_init_eeprom_params(struct e1000_hw *hw);
@@ -400,13 +395,8 @@ int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw);
400int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); 395int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data);
401int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); 396int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num);
402int32_t e1000_read_mac_addr(struct e1000_hw * hw); 397int32_t e1000_read_mac_addr(struct e1000_hw * hw);
403int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask);
404void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask);
405void e1000_release_software_flag(struct e1000_hw *hw);
406int32_t e1000_get_software_flag(struct e1000_hw *hw);
407 398
408/* Filters (multicast, vlan, receive) */ 399/* Filters (multicast, vlan, receive) */
409void e1000_mc_addr_list_update(struct e1000_hw *hw, uint8_t * mc_addr_list, uint32_t mc_addr_count, uint32_t pad, uint32_t rar_used_count);
410uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); 400uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr);
411void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); 401void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value);
412void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index); 402void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index);
@@ -431,31 +421,9 @@ void e1000_pci_clear_mwi(struct e1000_hw *hw);
431void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); 421void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
432void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); 422void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value);
433/* Port I/O is only supported on 82544 and newer */ 423/* Port I/O is only supported on 82544 and newer */
434uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port);
435uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset);
436void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); 424void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value);
437void e1000_enable_pciex_master(struct e1000_hw *hw);
438int32_t e1000_disable_pciex_master(struct e1000_hw *hw); 425int32_t e1000_disable_pciex_master(struct e1000_hw *hw);
439int32_t e1000_get_software_semaphore(struct e1000_hw *hw);
440void e1000_release_software_semaphore(struct e1000_hw *hw);
441int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); 426int32_t e1000_check_phy_reset_block(struct e1000_hw *hw);
442int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop);
443
444int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index,
445 uint8_t *data);
446int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index,
447 uint8_t byte);
448int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index,
449 uint8_t byte);
450int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index,
451 uint16_t *data);
452int32_t e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
453 uint32_t size, uint16_t *data);
454int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
455 uint16_t words, uint16_t *data);
456int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset,
457 uint16_t words, uint16_t *data);
458int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment);
459 427
460 428
461#define E1000_READ_REG_IO(a, reg) \ 429#define E1000_READ_REG_IO(a, reg) \
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 627f224d78bc..726f43d55937 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4386,11 +4386,13 @@ e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
4386 pci_write_config_word(adapter->pdev, reg, *value); 4386 pci_write_config_word(adapter->pdev, reg, *value);
4387} 4387}
4388 4388
4389#if 0
4389uint32_t 4390uint32_t
4390e1000_io_read(struct e1000_hw *hw, unsigned long port) 4391e1000_io_read(struct e1000_hw *hw, unsigned long port)
4391{ 4392{
4392 return inl(port); 4393 return inl(port);
4393} 4394}
4395#endif /* 0 */
4394 4396
4395void 4397void
4396e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) 4398e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value)