lkml.org 
[lkml]   [2020]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 2/8] include: fpga: adi-axi-common.h: add version helper macros
On Sat, 21 Mar 2020 10:53:09 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> 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>
Applied,

Thanks,

Jonathan

> ---
> include/linux/fpga/adi-axi-common.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/fpga/adi-axi-common.h b/include/linux/fpga/adi-axi-common.h
> index ebd4e07ae3d8..141ac3f251e6 100644
> --- a/include/linux/fpga/adi-axi-common.h
> +++ b/include/linux/fpga/adi-axi-common.h
> @@ -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_ */

\
 
 \ /
  Last update: 2020-03-21 18:22    [W:0.198 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site