diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-08-15 02:00:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-19 17:44:28 -0400 |
commit | e4c780b1ffc7d7bc27b7dc57fcf17ebb8d3006bc (patch) | |
tree | 5d7858b0067f56d3584c1ff572211edd106f74c0 /drivers/net/e1000 | |
parent | 3418e469ebaebec16f7df83074087eb901fb76b9 (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>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_hw.c | 89 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_hw.h | 32 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 2 |
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); |
106 | static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); | 106 | static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); |
107 | 107 | ||
108 | static int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, | ||
109 | uint32_t segment); | ||
110 | static int32_t e1000_get_software_flag(struct e1000_hw *hw); | ||
111 | static int32_t e1000_get_software_semaphore(struct e1000_hw *hw); | ||
112 | static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw); | ||
113 | static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); | ||
114 | static int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, | ||
115 | uint16_t words, uint16_t *data); | ||
116 | static int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, | ||
117 | uint8_t* data); | ||
118 | static int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, | ||
119 | uint16_t *data); | ||
120 | static int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, | ||
121 | uint16_t *data); | ||
122 | static void e1000_release_software_flag(struct e1000_hw *hw); | ||
123 | static void e1000_release_software_semaphore(struct e1000_hw *hw); | ||
124 | static int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, | ||
125 | uint32_t no_snoop); | ||
126 | static int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, | ||
127 | uint32_t index, uint8_t byte); | ||
128 | static int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, | ||
129 | uint16_t words, uint16_t *data); | ||
130 | static int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, | ||
131 | uint8_t data); | ||
132 | static 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 */ |
109 | static const | 136 | static const |
110 | uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] = | 137 | uint16_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 | ||
3236 | int32_t | 3263 | static int32_t |
3237 | e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) | 3264 | e1000_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 | ||
3280 | void | 3307 | static void |
3281 | e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) | 3308 | e1000_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 | ||
3578 | int32_t | 3605 | static int32_t |
3579 | e1000_read_kmrn_reg(struct e1000_hw *hw, | 3606 | e1000_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 | ||
3611 | int32_t | 3638 | static int32_t |
3612 | e1000_write_kmrn_reg(struct e1000_hw *hw, | 3639 | e1000_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 | ******************************************************************************/ |
3842 | int32_t | 3869 | static int32_t |
3843 | e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) | 3870 | e1000_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 | ******************************************************************************/ |
4089 | int32_t | 4116 | static int32_t |
4090 | e1000_phy_ife_get_info(struct e1000_hw *hw, | 4117 | e1000_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 | ||
5646 | void | 5674 | void |
5647 | e1000_mc_addr_list_update(struct e1000_hw *hw, | 5675 | e1000_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 | ||
6590 | uint32_t | 6620 | uint32_t |
6591 | e1000_read_reg_io(struct e1000_hw *hw, | 6621 | e1000_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 | ||
7912 | void | 7944 | void |
7913 | e1000_enable_pciex_master(struct e1000_hw *hw) | 7945 | e1000_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 | ***************************************************************************/ |
8151 | int32_t | 8184 | static int32_t |
8152 | e1000_get_software_semaphore(struct e1000_hw *hw) | 8185 | e1000_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 | ***************************************************************************/ |
8186 | void | 8219 | static void |
8187 | e1000_release_software_semaphore(struct e1000_hw *hw) | 8220 | e1000_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 | *****************************************************************************/ |
8268 | int32_t | 8301 | static int32_t |
8269 | e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop) | 8302 | e1000_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 | ***************************************************************************/ |
8309 | int32_t | 8342 | static int32_t |
8310 | e1000_get_software_flag(struct e1000_hw *hw) | 8343 | e1000_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 | ***************************************************************************/ |
8348 | void | 8381 | static void |
8349 | e1000_release_software_flag(struct e1000_hw *hw) | 8382 | e1000_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 | ||
8372 | int32_t | 8406 | int32_t |
8373 | e1000_ife_disable_dynamic_power_down(struct e1000_hw *hw) | 8407 | e1000_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 | ||
8400 | int32_t | 8436 | int32_t |
8401 | e1000_ife_enable_dynamic_power_down(struct e1000_hw *hw) | 8437 | e1000_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 | *****************************************************************************/ |
8429 | int32_t | 8466 | static int32_t |
8430 | e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, | 8467 | e1000_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 | *****************************************************************************/ |
8485 | int32_t | 8522 | static int32_t |
8486 | e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, | 8523 | e1000_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 | ****************************************************************************/ |
8532 | int32_t | 8569 | static int32_t |
8533 | e1000_ich8_cycle_init(struct e1000_hw *hw) | 8570 | e1000_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 | ****************************************************************************/ |
8599 | int32_t | 8636 | static int32_t |
8600 | e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout) | 8637 | e1000_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 | *****************************************************************************/ |
8634 | int32_t | 8671 | static int32_t |
8635 | e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, | 8672 | e1000_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 | *****************************************************************************/ |
8713 | int32_t | 8750 | static int32_t |
8714 | e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, | 8751 | e1000_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 | *****************************************************************************/ |
8788 | int32_t | 8825 | static int32_t |
8789 | e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data) | 8826 | e1000_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 | *****************************************************************************/ |
8811 | int32_t | 8848 | static int32_t |
8812 | e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte) | 8849 | e1000_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 | *****************************************************************************/ |
8842 | int32_t | 8879 | static int32_t |
8843 | e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data) | 8880 | e1000_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 | *****************************************************************************/ |
8860 | int32_t | 8897 | static int32_t |
8861 | e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data) | 8898 | e1000_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 | ||
8875 | int32_t | 8913 | int32_t |
8876 | e1000_write_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t data) | 8914 | e1000_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 | *****************************************************************************/ |
8890 | int32_t | 8929 | static int32_t |
8891 | e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t segment) | 8930 | e1000_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 | ||
8987 | int32_t | 9027 | int32_t |
8988 | e1000_duplex_reversal(struct e1000_hw *hw) | 9028 | e1000_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 | ||
9016 | int32_t | 9057 | static int32_t |
9017 | e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, | 9058 | e1000_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 | ||
9050 | int32_t | 9091 | static int32_t |
9051 | e1000_init_lcd_from_nvm(struct e1000_hw *hw) | 9092 | e1000_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 | |||
323 | int32_t e1000_phy_hw_reset(struct e1000_hw *hw); | 323 | int32_t e1000_phy_hw_reset(struct e1000_hw *hw); |
324 | int32_t e1000_phy_reset(struct e1000_hw *hw); | 324 | int32_t e1000_phy_reset(struct e1000_hw *hw); |
325 | void e1000_phy_powerdown_workaround(struct e1000_hw *hw); | 325 | void e1000_phy_powerdown_workaround(struct e1000_hw *hw); |
326 | int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); | ||
327 | int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, uint32_t cnf_base_addr, uint32_t cnf_size); | ||
328 | int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw); | ||
329 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); | 326 | int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); |
330 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); | 327 | int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); |
331 | int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data); | ||
332 | int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); | ||
333 | 328 | ||
334 | /* EEPROM Functions */ | 329 | /* EEPROM Functions */ |
335 | int32_t e1000_init_eeprom_params(struct e1000_hw *hw); | 330 | int32_t e1000_init_eeprom_params(struct e1000_hw *hw); |
@@ -400,13 +395,8 @@ int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); | |||
400 | int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); | 395 | int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); |
401 | int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); | 396 | int32_t e1000_read_part_num(struct e1000_hw *hw, uint32_t * part_num); |
402 | int32_t e1000_read_mac_addr(struct e1000_hw * hw); | 397 | int32_t e1000_read_mac_addr(struct e1000_hw * hw); |
403 | int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask); | ||
404 | void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask); | ||
405 | void e1000_release_software_flag(struct e1000_hw *hw); | ||
406 | int32_t e1000_get_software_flag(struct e1000_hw *hw); | ||
407 | 398 | ||
408 | /* Filters (multicast, vlan, receive) */ | 399 | /* Filters (multicast, vlan, receive) */ |
409 | void 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); | ||
410 | uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); | 400 | uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); |
411 | void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); | 401 | void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); |
412 | void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index); | 402 | void 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); | |||
431 | void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); | 421 | void e1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); |
432 | void e1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t * value); | 422 | void 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 */ |
434 | uint32_t e1000_io_read(struct e1000_hw *hw, unsigned long port); | ||
435 | uint32_t e1000_read_reg_io(struct e1000_hw *hw, uint32_t offset); | ||
436 | void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); | 424 | void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); |
437 | void e1000_enable_pciex_master(struct e1000_hw *hw); | ||
438 | int32_t e1000_disable_pciex_master(struct e1000_hw *hw); | 425 | int32_t e1000_disable_pciex_master(struct e1000_hw *hw); |
439 | int32_t e1000_get_software_semaphore(struct e1000_hw *hw); | ||
440 | void e1000_release_software_semaphore(struct e1000_hw *hw); | ||
441 | int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); | 426 | int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); |
442 | int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop); | ||
443 | |||
444 | int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, | ||
445 | uint8_t *data); | ||
446 | int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, | ||
447 | uint8_t byte); | ||
448 | int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, | ||
449 | uint8_t byte); | ||
450 | int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, | ||
451 | uint16_t *data); | ||
452 | int32_t e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, | ||
453 | uint32_t size, uint16_t *data); | ||
454 | int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, | ||
455 | uint16_t words, uint16_t *data); | ||
456 | int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, | ||
457 | uint16_t words, uint16_t *data); | ||
458 | int32_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 | ||
4389 | uint32_t | 4390 | uint32_t |
4390 | e1000_io_read(struct e1000_hw *hw, unsigned long port) | 4391 | e1000_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 | ||
4395 | void | 4397 | void |
4396 | e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) | 4398 | e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) |