raw/ifpga/base: support multiple cards
authorTianfei Zhang <tianfei.zhang@intel.com>
Thu, 14 Nov 2019 09:03:06 +0000 (17:03 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Nov 2019 16:36:05 +0000 (17:36 +0100)
commit4a19f89104f8a021b7346db6216d2f723a2ffb86
tree2a46288b93414edd86bfe473827f73039657748f
parente21346c4392b9d9a0f7429ab2b0b632f6bdc69e4
raw/ifpga/base: support multiple cards

In PAC N3000 card, there is one MAX10 chip in each card, and
all of the sensors are connected to MAX10 chip. To support multiple
cards in one server, we introducing a sensor device list under
intel_max10_device instead of a global list. On the other hand, we
using separate intel_max10_device instance for each opae_adatper.

Add mutex lock on do_transaction() function for SPI driver to avoid
race condition.

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Andy Pei <andy.pei@intel.com>
12 files changed:
drivers/raw/ifpga/base/ifpga_fme.c
drivers/raw/ifpga/base/opae_debug.c
drivers/raw/ifpga/base/opae_hw_api.c
drivers/raw/ifpga/base/opae_hw_api.h
drivers/raw/ifpga/base/opae_i2c.c
drivers/raw/ifpga/base/opae_i2c.h
drivers/raw/ifpga/base/opae_intel_max10.c
drivers/raw/ifpga/base/opae_intel_max10.h
drivers/raw/ifpga/base/opae_spi.c
drivers/raw/ifpga/base/opae_spi.h
drivers/raw/ifpga/base/opae_spi_transaction.c
drivers/raw/ifpga/ifpga_rawdev.c