Re: [PATCH 1/3] include: fpga: adi-axi-common: Define version macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > ---
> >  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á





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux