mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
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>
This commit is contained in:
parent
641dedd50c
commit
20d5fa48d3
1 changed files with 4 additions and 0 deletions
|
@ -16,4 +16,8 @@
|
|||
#define ADI_AXI_PCORE_VER(major, minor, patch) \
|
||||
(((major) << 16) | ((minor) << 8) | (patch))
|
||||
|
||||
#define ADI_AXI_PCORE_VER_MAJOR(version) (((version) >> 16) & 0xff)
|
||||
#define ADI_AXI_PCORE_VER_MINOR(version) (((version) >> 8) & 0xff)
|
||||
#define ADI_AXI_PCORE_VER_PATCH(version) ((version) & 0xff)
|
||||
|
||||
#endif /* ADI_AXI_COMMON_H_ */
|
||||
|
|
Loading…
Reference in a new issue