linux/drivers/fpga
Ilpo Järvinen 867cae44f8 mfd: intel-m10-bmc: Manage access to MAX 10 fw handshake registers
On some MAX 10 cards, the BMC firmware is not available to service
handshake registers during secure update erase and write phases at
normal speeds. This problem affects at least hwmon driver. When the MAX
10 hwmon driver tries to read the sensor values during a secure update,
the reads are slowed down (e.g., reading all D5005 sensors takes ~24s
which is magnitudes worse than the normal <0.02s).

Manage access to the handshake registers using a rw semaphore and a FW
state variable to prevent accesses during those secure update phases
and return -EBUSY instead.

If handshake_sys_reg_nranges == 0, don't update bwcfw_state as it is not
used. This avoids the locking cost.

Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Co-developed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-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/20230417092653.16487-5-ilpo.jarvinen@linux.intel.com
2023-06-15 09:19:36 +01:00
..
altera-cvp.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
altera-fpga2sdram.c fpga: bridge: Use standard dev_release for class driver 2021-11-28 14:02:13 -08:00
altera-freeze-bridge.c fpga: bridge: Use standard dev_release for class driver 2021-11-28 14:02:13 -08:00
altera-hps2fpga.c fpga: bridge: Use standard dev_release for class driver 2021-11-28 14:02:13 -08:00
altera-pr-ip-core-plat.c fpga: fpga-mgr: altera-pr-ip: Simplify registration 2020-12-01 18:49:32 +01:00
altera-pr-ip-core.c fpga: altera-pr-ip: fix unsigned comparison with less than zero 2022-06-10 15:48:23 +08:00
altera-ps-spi.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
dfl-afu-dma-region.c fpga: dfl: afu: convert get_user_pages() --> pin_user_pages() 2020-06-18 18:12:06 -07:00
dfl-afu-error.c fpga: dfl: afu: harden port enable logic 2021-03-24 11:15:04 -07:00
dfl-afu-main.c fpga: dfl: afu: harden port enable logic 2021-03-24 11:15:04 -07:00
dfl-afu-region.c fpga: dfl: more kernel-doc corrections 2023-01-28 23:33:43 +08:00
dfl-afu.h fpga: dfl: more kernel-doc corrections 2023-01-28 23:33:43 +08:00
dfl-fme-br.c fpga: bridge: Use standard dev_release for class driver 2021-11-28 14:02:13 -08:00
dfl-fme-error.c fpga: dfl: fme: add interrupt support for global error reporting 2020-07-06 21:35:42 -07:00
dfl-fme-main.c fpga: dfl: fme: add interrupt support for global error reporting 2020-07-06 21:35:42 -07:00
dfl-fme-mgr.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
dfl-fme-perf.c fpga: dfl: more kernel-doc corrections 2023-01-28 23:33:43 +08:00
dfl-fme-pr.c fpga: dfl: kernel-doc corrections 2023-01-28 23:33:05 +08:00
dfl-fme-pr.h fpga: dfl: more kernel-doc corrections 2023-01-28 23:33:43 +08:00
dfl-fme-region.c fpga: region: Use standard dev_release for class driver 2021-11-28 14:02:41 -08:00
dfl-fme.h fpga: dfl: fme: add performance reporting support 2020-04-28 15:49:28 +02:00
dfl-n3000-nios.c fpga: fix spelling mistakes 2021-07-21 19:54:21 -07:00
dfl-pci.c fpga: dfl-pci: Drop redundant pci_enable_pcie_error_reporting() 2023-03-10 16:39:44 +08:00
dfl.c Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
dfl.h Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
fpga-bridge.c Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
fpga-mgr.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
fpga-region.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
ice40-spi.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
intel-m10-bmc-sec-update.c mfd: intel-m10-bmc: Manage access to MAX 10 fw handshake registers 2023-06-15 09:19:36 +01:00
Kconfig mfd: intel-m10-bmc: Split into core and spi specific parts 2023-01-27 10:35:00 +00:00
lattice-sysconfig-spi.c fpga: lattice-sysconfig-spi: Add explicit include for of.h 2023-04-06 20:36:27 +02:00
lattice-sysconfig.c fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager 2022-10-25 14:44:03 +08:00
lattice-sysconfig.h fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager 2022-10-25 14:44:03 +08:00
machxo2-spi.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
Makefile fpga: lattice-sysconfig-spi: add Lattice sysCONFIG FPGA manager 2022-10-25 14:44:03 +08:00
microchip-spi.c fpga: microchip-spi: separate data frame write routine 2023-01-28 23:20:35 +08:00
of-fpga-region.c fpga: fpga-region: fix kernel-doc formatting issues 2022-05-10 16:05:00 +08:00
socfpga-a10.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
socfpga.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
stratix10-soc.c fpga: stratix10-soc: Fix return value check in s10_ops_write_init() 2022-12-30 10:38:29 +08:00
ts73xx-fpga.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
versal-fpga.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
xilinx-pr-decoupler.c fpga: xilinx-pr-decoupler: Use readl wrapper instead of pure readl 2023-03-25 15:35:12 +08:00
xilinx-spi.c fpga: mgr: Use standard dev_release for class driver 2021-11-28 13:59:13 -08:00
zynq-fpga.c fpga: zynq: Switch to use dev_err_probe() helper 2022-10-25 14:25:02 +08:00
zynqmp-fpga.c fpga: zynqmp-fpga: Adds status interface 2023-03-09 17:33:19 +01:00