fpga: dfl: parse interrupt info for feature devices on enumeration
authorXu Yilun <yilun.xu@intel.com>
Tue, 16 Jun 2020 04:08:42 +0000 (12:08 +0800)
committerMoritz Fischer <mdf@kernel.org>
Sun, 28 Jun 2020 19:42:29 +0000 (12:42 -0700)
commit8d021039cbb5e358c7c07c562811253a61c8d551
treea2c270d5860d8bd25a59ea63c28722c1a6e79844
parentdd2784c01d93db20252a6416f3007cbbb89e4758
fpga: dfl: parse interrupt info for feature devices on enumeration

DFL based FPGA devices could support interrupts for different purposes,
but current DFL framework only supports feature device enumeration with
given MMIO resources information via common DFL headers. This patch
introduces one new API dfl_fpga_enum_info_add_irq for low level bus
drivers (e.g. PCIe device driver) to pass its interrupt resources
information to DFL framework for enumeration, and also adds interrupt
enumeration code in framework to parse and assign interrupt resources
for enumerated feature devices and their own sub features.

With this patch, DFL framework enumerates interrupt resources for core
features, including PORT Error Reporting, FME (FPGA Management Engine)
Error Reporting and also AFU User Interrupts.

Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
drivers/fpga/dfl.c
drivers/fpga/dfl.h