Lines Matching defs:bank

99 static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank);
3285 * e1000_valid_nvm_bank_detect_ich8lan - finds out the valid bank 0 or 1
3287 * @bank: pointer to the variable that returns the active bank
3290 * Word 0x13 bits 15:14 = 10b indicate a valid signature for that bank.
3292 static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
3314 /* set bank to 0 in case flash read fails */
3315 *bank = 0;
3317 /* Check bank 0 */
3325 *bank = 0;
3329 /* Check bank 1 */
3338 *bank = 1;
3342 e_dbg("ERROR: No valid NVM bank present\n");
3350 *bank = 1;
3352 *bank = 0;
3356 e_dbg("Unable to determine valid NVM bank via EEC - reading flash signature\n");
3359 /* set bank to 0 in case flash read fails */
3360 *bank = 0;
3362 /* Check bank 0 */
3369 *bank = 0;
3373 /* Check bank 1 */
3381 *bank = 1;
3385 e_dbg("ERROR: No valid NVM bank present\n");
3406 u32 bank = 0;
3420 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank);
3422 e_dbg("Could not detect valid bank, assuming bank 0\n");
3423 bank = 0;
3426 act_offset = (bank) ? nvm->flash_bank_size : 0;
3499 u32 bank = 0;
3511 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank);
3513 e_dbg("Could not detect valid bank, assuming bank 0\n");
3514 bank = 0;
3517 act_offset = (bank) ? nvm->flash_bank_size : 0;
3917 * ram are then committed to the EEPROM by processing each bank at a time
3926 u32 i, act_offset, new_bank_offset, old_bank_offset, bank;
3939 /* We're writing to the opposite bank so if we're on bank 1,
3940 * write to bank 0 etc. We also need to erase the segment that
3943 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank);
3945 e_dbg("Could not detect valid bank, assuming bank 0\n");
3946 bank = 0;
3949 if (bank == 0) {
3964 * in the other NVM bank or a modified value stored
3998 /* Write the data to the new bank. Offset in words */
4078 * ram are then committed to the EEPROM by processing each bank at a time
4087 u32 i, act_offset, new_bank_offset, old_bank_offset, bank;
4100 /* We're writing to the opposite bank so if we're on bank 1,
4101 * write to bank 0 etc. We also need to erase the segment that
4104 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank);
4106 e_dbg("Could not detect valid bank, assuming bank 0\n");
4107 bank = 0;
4110 if (bank == 0) {
4148 /* Write the bytes to the new bank. */
4584 * e1000_erase_flash_bank_ich8lan - Erase a bank (4k) from NVM
4586 * @bank: 0 for first bank, 1 for second bank, etc.
4588 * Erases the bank specified. Each bank is a 4k block. Banks are 0 based.
4589 * bank N is 4096 * N + flash_reg_addr.
4591 static s32 e1000_erase_flash_bank_ich8lan(struct e1000_hw *hw, u32 bank)
4597 /* bank size is in 16bit words - adjust to bytes */
4609 * can be calculated as = bank * 4096 + n * 256
4612 * as = bank * 4096
4613 * 10: The Hw sector is 8K bytes, nth sector = bank * 8192
4615 * 11: The Hw sector is 64K bytes, nth sector = bank * 65536
4641 flash_linear_addr += (bank) ? flash_bank_size : 0;
5821 u32 bank = 0;
5855 if (e1000_valid_nvm_bank_detect_ich8lan(hw, &bank)) {