]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite3f41caa87b6f8e929b85fdbb483d5856e232df2
tree15a727d88aab6b0c9d2cde901b9e49f4ad34e7f5
parent1baac607e93db437c35a9d2011f17526e23c736f
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