Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
e1000_i210.h File Reference

Go to the source code of this file.

Macros

#define E1000_STM_OPCODE   0xDB00
 
#define E1000_EEPROM_FLASH_SIZE_WORD   0x11
 
#define INVM_DWORD_TO_RECORD_TYPE(invm_dword)   (u8)((invm_dword) & 0x7)
 
#define INVM_DWORD_TO_WORD_ADDRESS(invm_dword)   (u8)(((invm_dword) & 0x0000FE00) >> 9)
 
#define INVM_DWORD_TO_WORD_DATA(invm_dword)   (u16)(((invm_dword) & 0xFFFF0000) >> 16)
 
#define E1000_INVM_RSA_KEY_SHA256_DATA_SIZE_IN_DWORDS   8
 
#define E1000_INVM_CSR_AUTOLOAD_DATA_SIZE_IN_DWORDS   1
 
#define ID_LED_DEFAULT_I210
 
#define ID_LED_DEFAULT_I210_SERDES
 

Enumerations

enum  E1000_INVM_STRUCTURE_TYPE {
  E1000_INVM_UNINITIALIZED_STRUCTURE = 0x00, E1000_INVM_WORD_AUTOLOAD_STRUCTURE = 0x01, E1000_INVM_CSR_AUTOLOAD_STRUCTURE = 0x02, E1000_INVM_PHY_REGISTER_AUTOLOAD_STRUCTURE = 0x03,
  E1000_INVM_RSA_KEY_SHA256_STRUCTURE = 0x04, E1000_INVM_INVALIDATED_STRUCTURE = 0x0F
}
 

Functions

s32 igb_update_flash_i210 (struct e1000_hw *hw)
 
s32 igb_update_nvm_checksum_i210 (struct e1000_hw *hw)
 
s32 igb_validate_nvm_checksum_i210 (struct e1000_hw *hw)
 
s32 igb_write_nvm_srwr_i210 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 igb_read_nvm_srrd_i210 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 
s32 igb_read_invm_i211 (struct e1000_hw *hw, u16 address, u16 *data)
 
s32 igb_acquire_swfw_sync_i210 (struct e1000_hw *hw, u16 mask)
 
void igb_release_swfw_sync_i210 (struct e1000_hw *hw, u16 mask)
 
s32 igb_acquire_nvm_i210 (struct e1000_hw *hw)
 
void igb_release_nvm_i210 (struct e1000_hw *hw)
 
s32 igb_valid_led_default_i210 (struct e1000_hw *hw, u16 *data)
 
s32 igb_read_nvm_i211 (struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 

Macro Definition Documentation

#define E1000_EEPROM_FLASH_SIZE_WORD   0x11

Definition at line 48 of file e1000_i210.h.

#define E1000_INVM_CSR_AUTOLOAD_DATA_SIZE_IN_DWORDS   1

Definition at line 67 of file e1000_i210.h.

#define E1000_INVM_RSA_KEY_SHA256_DATA_SIZE_IN_DWORDS   8

Definition at line 66 of file e1000_i210.h.

#define E1000_STM_OPCODE   0xDB00

Definition at line 47 of file e1000_i210.h.

#define ID_LED_DEFAULT_I210
Value:

Definition at line 69 of file e1000_i210.h.

#define ID_LED_DEFAULT_I210_SERDES
Value:

Definition at line 72 of file e1000_i210.h.

#define INVM_DWORD_TO_RECORD_TYPE (   invm_dword)    (u8)((invm_dword) & 0x7)

Definition at line 50 of file e1000_i210.h.

#define INVM_DWORD_TO_WORD_ADDRESS (   invm_dword)    (u8)(((invm_dword) & 0x0000FE00) >> 9)

Definition at line 52 of file e1000_i210.h.

#define INVM_DWORD_TO_WORD_DATA (   invm_dword)    (u16)(((invm_dword) & 0xFFFF0000) >> 16)

Definition at line 54 of file e1000_i210.h.

Enumeration Type Documentation

Enumerator:
E1000_INVM_UNINITIALIZED_STRUCTURE 
E1000_INVM_WORD_AUTOLOAD_STRUCTURE 
E1000_INVM_CSR_AUTOLOAD_STRUCTURE 
E1000_INVM_PHY_REGISTER_AUTOLOAD_STRUCTURE 
E1000_INVM_RSA_KEY_SHA256_STRUCTURE 
E1000_INVM_INVALIDATED_STRUCTURE 

Definition at line 57 of file e1000_i210.h.

Function Documentation

s32 igb_acquire_nvm_i210 ( struct e1000_hw hw)

igb_acquire_nvm_i210 - Request for access to EEPROM : pointer to the HW structure

Acquire the necessary semaphores for exclusive access to the EEPROM. Set the EEPROM access request bit and wait for EEPROM access grant bit. Return successful if access grant bit set, else clear the request for EEPROM access and return -E1000_ERR_NVM (-1).

Definition at line 53 of file e1000_i210.c.

s32 igb_acquire_swfw_sync_i210 ( struct e1000_hw hw,
u16  mask 
)

igb_acquire_swfw_sync_i210 - Acquire SW/FW semaphore : pointer to the HW structure : specifies which semaphore to acquire

Acquire the SW/FW semaphore to access the PHY or NVM. The mask will also specify which port we're acquiring the lock for.

Definition at line 78 of file e1000_i210.c.

s32 igb_read_invm_i211 ( struct e1000_hw hw,
u16  address,
u16 data 
)

igb_read_invm_i211 - Reads OTP : pointer to the HW structure : the word address (aka eeprom offset) to read : pointer to the data read

Reads 16-bit words from the OTP. Return error when the word is not stored in OTP.

Definition at line 392 of file e1000_i210.c.

s32 igb_read_nvm_i211 ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

igb_read_nvm_i211 - Read NVM wrapper function for I211 : pointer to the HW structure : the word address (aka eeprom offset) to read : pointer to the data read

Wrapper function to return data formerly found in the NVM.

Definition at line 339 of file e1000_i210.c.

s32 igb_read_nvm_srrd_i210 ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

igb_read_nvm_srrd_i210 - Reads Shadow Ram using EERD register : pointer to the HW structure : offset of word in the Shadow Ram to read : number of words to read : word read from the Shadow Ram

Reads a 16 bit word from the Shadow Ram using the EERD register. Uses necessary synchronization semaphores.

Definition at line 204 of file e1000_i210.c.

void igb_release_nvm_i210 ( struct e1000_hw hw)

igb_release_nvm_i210 - Release exclusive access to EEPROM : pointer to the HW structure

Stop any current commands to the EEPROM and clear the EEPROM request bit, then release the semaphores acquired.

Definition at line 65 of file e1000_i210.c.

void igb_release_swfw_sync_i210 ( struct e1000_hw hw,
u16  mask 
)

igb_release_swfw_sync_i210 - Release SW/FW semaphore : pointer to the HW structure : specifies which semaphore to acquire

Release the SW/FW semaphore used to access the PHY or NVM. The mask will also specify which port we're releasing the lock for.

Definition at line 126 of file e1000_i210.c.

s32 igb_update_flash_i210 ( struct e1000_hw hw)

igb_update_flash_i210 - Commit EEPROM to the flash : pointer to the HW structure

Definition at line 526 of file e1000_i210.c.

s32 igb_update_nvm_checksum_i210 ( struct e1000_hw hw)

igb_update_nvm_checksum_i210 - Update EEPROM checksum : pointer to the HW structure

Updates the EEPROM checksum by reading/adding each word of the EEPROM up to the checksum. Then calculates the EEPROM checksum and writes the value to the EEPROM. Next commit EEPROM data onto the Flash.

Definition at line 469 of file e1000_i210.c.

s32 igb_valid_led_default_i210 ( struct e1000_hw hw,
u16 data 
)

igb_valid_led_default_i210 - Verify a valid default LED config : pointer to the HW structure : pointer to the NVM (EEPROM)

Read the EEPROM for the current default LED configuration. If the LED configuration is not valid, set to a valid LED configuration.

Definition at line 580 of file e1000_i210.c.

s32 igb_validate_nvm_checksum_i210 ( struct e1000_hw hw)

igb_validate_nvm_checksum_i210 - Validate EEPROM checksum : pointer to the HW structure

Calculates the EEPROM checksum by reading/adding each word of the EEPROM and then verifies that the sum of the EEPROM is equal to 0xBABA.

Definition at line 432 of file e1000_i210.c.

s32 igb_write_nvm_srwr_i210 ( struct e1000_hw hw,
u16  offset,
u16  words,
u16 data 
)

igb_write_nvm_srwr_i210 - Write to Shadow RAM using EEWR : pointer to the HW structure : offset within the Shadow RAM to be written to : number of words to write : 16 bit word(s) to be written to the Shadow RAM

Writes data to Shadow RAM at offset using EEWR register.

If e1000_update_nvm_checksum is not called after this function , the data will not be committed to FLASH and also Shadow RAM will most likely contain an invalid checksum.

If error code is returned, data and Shadow RAM may be inconsistent - buffer partially written.

Definition at line 247 of file e1000_i210.c.