fpga: dfl: expose feature revision from struct dfl_device

DFL device drivers have a common need for checking feature revision
information from the DFL header, as well as other common DFL information
like the already exposed feature id and type.

This patch exposes the feature revision information directly via the DFL
device data structure.

Since the DFL core code has already read the DFL header, this this patch
saves additional mmio reads from DFL device drivers too.

Acked-by: Wu Hao <hao.wu@intel.com>
Acked-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Martin Hundebøll <mhu@silicom.dk>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
This commit is contained in:
Martin Hundebøll
2021-07-16 15:54:39 +02:00
committed by Moritz Fischer
parent 5f1895e0e3
commit 1604986c3e
3 changed files with 19 additions and 10 deletions

View File

@@ -38,6 +38,7 @@ struct dfl_device {
int id;
u16 type;
u16 feature_id;
u8 revision;
struct resource mmio_res;
int *irqs;
unsigned int num_irqs;