Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

include: fpga: adi-axi-common.h: add version helper macros

The format for all ADI AXI IP cores is the same.
i.e. 'major.minor.patch'.

This patch adds the helper macros to be re-used in ADI AXI drivers.

Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Alexandru Ardelean and committed by
Jonathan Cameron
20d5fa48 641dedd5

+4
+4
include/linux/fpga/adi-axi-common.h
··· 16 16 #define ADI_AXI_PCORE_VER(major, minor, patch) \ 17 17 (((major) << 16) | ((minor) << 8) | (patch)) 18 18 19 + #define ADI_AXI_PCORE_VER_MAJOR(version) (((version) >> 16) & 0xff) 20 + #define ADI_AXI_PCORE_VER_MINOR(version) (((version) >> 8) & 0xff) 21 + #define ADI_AXI_PCORE_VER_PATCH(version) ((version) & 0xff) 22 + 19 23 #endif /* ADI_AXI_COMMON_H_ */