net/ice/base: extract logic of flat NVM read to function
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 23 Mar 2020 07:17:42 +0000 (15:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:05 +0000 (13:57 +0200)
commit2516684aed7a4ea93391caefe8e2cdc486955a83
tree4c4739bc9ba5366a69ce67949097fa739e4fb92e
parent84551c956587d5f435ca9cb617f920e1933dbf35
net/ice/base: extract logic of flat NVM read to function

The ice_read_sr_buf_aq function implements logic to correctly break
apart NVM reads into 4Kb chunks. Additionally, it ensures that each read
never crosses a Shadow RAM sector boundary. This logic is useful when
reading the flat NVM as a byte-addressable stream.

Extract that logic in terms of bytes and implement it as
ice_read_flat_nvm. Use this new function to implement ice_read_sr_buf_aq
function.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_nvm.c
drivers/net/ice/base/ice_nvm.h