[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-fpga
Subject:    Re: [PATCH 1/3] include: fpga: adi-axi-common: Define version macros
From:       "Sa, Nuno" <Nuno.Sa () analog ! com>
Date:       2019-09-30 10:46:38
Message-ID: a9f4640768627fc17ff220996afd6d4b63de2505.camel () analog ! com
[Download RAW message or body]

Hi Moritz,

On Fri, 2019-09-27 at 08:01 -0700, Moritz Fischer wrote:
> 
> Hi Nuno,
> 
> On Thu, Sep 26, 2019 at 12:39:23PM +0200, Nuno Sá wrote:
> > Add commom macros to "parse" ADI HDL cores version, in terms of
> > major, minor and patch.
> > 
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> >  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 7fc95d5c95bb..5bc5603e6bc8 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_ */
> > -- 
> > 2.23.0
> > 
> 
> While implemented in an FPGA I'm not sure if this needs to go into
> includelinux/fpga/.
> 
> I'd suggest to add this to the actual driver for now, and once you
> have
> multiple users you can find a common location.

Will do that.

> Cheers,
> Moritz

Thanks!
Nuno Sá


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic