fpga: intel-m10-bmc: Rework flash read/write
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 16 Jan 2023 10:08:40 +0000 (12:08 +0200)
committerLee Jones <lee@kernel.org>
Fri, 27 Jan 2023 10:37:20 +0000 (10:37 +0000)
commit3e10c805b382d0a8906a4fed109958cac637f5e0
tree3d4c2ea61ece637ed4c38af6006637a232f7d3e7
parent6052a005caf9cd484fe6368a31c736ac17ebaf66
fpga: intel-m10-bmc: Rework flash read/write

Access to flash staging area is different for N6000 from that of the
SPI interfaced counterparts. To make it easier to differentiate flash
access path, move read/write into new functions where the new access
path can be easily placed into. Rework the unaligned access such the
behavior it matches for both read and write.

This change also renames m10bmc_sec_write() to m10bmc_sec_fw_write() as
it would have a name conflict otherwise.

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-7-ilpo.jarvinen@linux.intel.com
drivers/fpga/intel-m10-bmc-sec-update.c