OSDN Git Service

ice: cache NVM module bank information
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 1 Oct 2020 17:31:42 +0000 (10:31 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 5 Feb 2021 19:35:41 +0000 (11:35 -0800)
commit1fa95e0120ebe4d8953cb86e1617e3ab1dc5ce89
tree15a727d88aab6b0c9d2cde901b9e49f4ad34e7f5
parent74789085d9ce9c626102d267eabfbff01a8cd855
ice: cache NVM module bank information

The ice flash contains two copies of each of the NVM, Option ROM, and
Netlist modules. Each bank has a pointer word and a size word. In order
to correctly read from the active flash bank, the driver must calculate
the offset manually.

During NVM initialization, read the Shadow RAM control word and
determine which bank is active for each NVM module. Additionally, cache
the size and pointer values for use in calculating the correct offset.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_nvm.c
drivers/net/ethernet/intel/ice/ice_type.h