fpga: dfl: expose feature revision from struct dfl_device
authorMartin Hundebøll <mhu@silicom.dk>
Fri, 16 Jul 2021 13:54:39 +0000 (15:54 +0200)
committerMoritz Fischer <mdf@kernel.org>
Thu, 29 Jul 2021 19:54:10 +0000 (12:54 -0700)
commit1604986c3e6bd84f3f3fd709c1a619c6fc9d79a9
treeaefabf9b4c8eac27a3656a22184b3d1676993a07
parent5f1895e0e381f04ef759cd33636d861b0fdcb3d1
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>
drivers/fpga/dfl.c
drivers/fpga/dfl.h
include/linux/dfl.h