Lines Matching full:bank

449  * ice_get_flash_bank_offset - Get offset into requested flash bank
451 * @bank: whether to read from the active or inactive flash bank
460 static u32 ice_get_flash_bank_offset(struct ice_hw *hw, enum ice_bank_select bank, u16 module)
496 ice_debug(hw, ICE_DBG_NVM, "Unexpected value for active flash bank: %u\n",
501 /* The second flash bank is stored immediately following the first
502 * bank. Based on whether the 1st or 2nd bank is active, and whether
503 * we want the active or inactive bank, calculate the desired offset.
505 switch (bank) {
512 ice_debug(hw, ICE_DBG_NVM, "Unexpected value for flash bank selection: %u\n", bank);
519 * @bank: which bank of the module to read
525 * Read data from the specified flash module. The bank parameter indicates
526 * whether or not to read from the active bank or the inactive bank of that
534 ice_read_flash_module(struct ice_hw *hw, enum ice_bank_select bank, u16 module,
542 start = ice_get_flash_bank_offset(hw, bank, module);
544 ice_debug(hw, ICE_DBG_NVM, "Unable to calculate flash bank offset for module 0x%04x\n",
563 * @bank: whether to read from active or inactive NVM module
571 ice_read_nvm_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
576 status = ice_read_flash_module(hw, bank, ICE_SR_1ST_NVM_BANK_PTR, offset * sizeof(u16),
587 * @bank: whether to read from the active or inactive flash bank
594 ice_get_nvm_css_hdr_len(struct ice_hw *hw, enum ice_bank_select bank,
601 status = ice_read_nvm_module(hw, bank, ICE_NVM_CSS_HDR_LEN_L,
606 status = ice_read_nvm_module(hw, bank, ICE_NVM_CSS_HDR_LEN_H,
621 * ice_read_nvm_sr_copy - Read a word from the Shadow RAM copy in the NVM bank
623 * @bank: whether to read from the active or inactive NVM module
631 ice_read_nvm_sr_copy(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
636 status = ice_get_nvm_css_hdr_len(hw, bank, &hdr_len);
642 return ice_read_nvm_module(hw, bank, hdr_len + offset, data);
648 * @bank: whether to read from active or inactive OROM module
657 ice_read_orom_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
662 status = ice_read_flash_module(hw, bank, ICE_SR_1ST_OROM_BANK_PTR, offset * sizeof(u16),
673 * @bank: whether to read from the active or inactive module
677 * Read a word from the specified netlist bank.
680 ice_read_netlist_module(struct ice_hw *hw, enum ice_bank_select bank, u32 offset, u16 *data)
685 status = ice_read_flash_module(hw, bank, ICE_SR_NETLIST_BANK_PTR, offset * sizeof(u16),
858 * @bank: whether to read from the active or inactive flash bank
862 * bank.
864 static int ice_get_nvm_srev(struct ice_hw *hw, enum ice_bank_select bank, u32 *srev)
869 status = ice_read_nvm_module(hw, bank, ICE_NVM_CSS_SREV_L, &srev_l);
873 status = ice_read_nvm_module(hw, bank, ICE_NVM_CSS_SREV_H, &srev_h);
885 * @bank: whether to read from the active or inactive flash bank
888 * Read the NVM EETRACK ID and map version of the main NVM image bank, filling
892 ice_get_nvm_ver_info(struct ice_hw *hw, enum ice_bank_select bank, struct ice_nvm_info *nvm)
897 status = ice_read_nvm_sr_copy(hw, bank, ICE_SR_NVM_DEV_STARTER_VER, &ver);
906 status = ice_read_nvm_sr_copy(hw, bank, ICE_SR_NVM_EETRACK_LO, &eetrack_lo);
911 status = ice_read_nvm_sr_copy(hw, bank, ICE_SR_NVM_EETRACK_HI, &eetrack_hi);
919 status = ice_get_nvm_srev(hw, bank, &nvm->srev);
927 * ice_get_inactive_nvm_ver - Read Option ROM version from the inactive bank
932 * inactive NVM bank. Used to access version data for a pending update that
943 * @bank: whether to read from active or inactive flash module
947 * bank.
949 static int ice_get_orom_srev(struct ice_hw *hw, enum ice_bank_select bank, u32 *srev)
957 status = ice_get_nvm_css_hdr_len(hw, bank, &hdr_len);
971 status = ice_read_orom_module(hw, bank, css_start + ICE_NVM_CSS_SREV_L, &srev_l);
975 status = ice_read_orom_module(hw, bank, css_start + ICE_NVM_CSS_SREV_H, &srev_h);
987 * @bank: whether to read from the active or inactive flash module
994 ice_get_orom_civd_data(struct ice_hw *hw, enum ice_bank_select bank,
1008 * usually somewhere in the middle of the bank. We need to scan the
1009 * Option ROM bank to locate it.
1017 status = ice_read_flash_module(hw, bank, ICE_SR_1ST_OROM_BANK_PTR,
1031 status = ice_read_flash_module(hw, bank, ICE_SR_1ST_OROM_BANK_PTR,
1065 * @bank: whether to read from the active or inactive flash module
1072 ice_get_orom_ver_info(struct ice_hw *hw, enum ice_bank_select bank, struct ice_orom_info *orom)
1078 status = ice_get_orom_civd_data(hw, bank, &civd);
1090 status = ice_get_orom_srev(hw, bank, &orom->srev);
1100 * ice_get_inactive_orom_ver - Read Option ROM version from the inactive bank
1116 * @bank: whether to read from the active or inactive flash bank
1119 * Get the netlist version information from the requested bank. Reads the Link
1124 ice_get_netlist_info(struct ice_hw *hw, enum ice_bank_select bank,
1131 status = ice_read_netlist_module(hw, bank, ICE_NETLIST_TYPE_OFFSET, &module_id);
1141 status = ice_read_netlist_module(hw, bank, ICE_LINK_TOPO_MODULE_LEN, &length);
1152 status = ice_read_netlist_module(hw, bank, ICE_LINK_TOPO_NODE_COUNT, &node_count);
1162 status = ice_read_flash_module(hw, bank, ICE_SR_NETLIST_BANK_PTR,
1207 * Read the netlist version data from the inactive netlist bank. Used to
1328 * ice_determine_active_flash_banks - Discover active bank for each module
1372 ice_debug(hw, ICE_DBG_NVM, "Failed to read NVM bank pointer\n");
1378 ice_debug(hw, ICE_DBG_NVM, "Failed to read NVM bank area size\n");
1384 ice_debug(hw, ICE_DBG_NVM, "Failed to read OROM bank pointer\n");
1390 ice_debug(hw, ICE_DBG_NVM, "Failed to read OROM bank area size\n");
1396 ice_debug(hw, ICE_DBG_NVM, "Failed to read Netlist bank pointer\n");
1402 ice_debug(hw, ICE_DBG_NVM, "Failed to read Netlist bank area size\n");
1770 * when activating the NVM bank, and whether an EMP reset is required for